当前位置:网站首页>Rhcsa 03 - Basic permissions for documents
Rhcsa 03 - Basic permissions for documents
2022-07-04 04:29:00 【Wangwanlin Ben】
Preface
Linux Of UGO The permissions model , It can meet daily permission requirements .
What is? UGO The permissions model ?
practice
step 1: Create user , And add users to the newly created group
[[email protected] ~]# groupadd students
[[email protected] ~]# groupadd profs
[[email protected] ~]# useradd linda -G students
useradd lisa -G students
[[email protected] ~]# useradd lisa -G students
useradd anouk -G profs
[[email protected] ~]# useradd anouk -G profs
useradd anna -G profs
[[email protected] ~]# useradd anna -G profs
[[email protected] ~]# step 2: Create two folders /data/students And /data/profs
[[email protected] ~]# mkdir -p /data/students /data/profs
[[email protected] ~]# ls -l /data
total 0
drwxr-xr-x. 2 root root 6 Jul 2 01:47 profs
drwxr-xr-x. 2 root root 6 Jul 2 01:47 studentsstep 3: The folder just created , Change the group to students, profs, Permission is 770
[[email protected] ~]# chgrp students /data/students
[[email protected] ~]# chgrp profs /data/profs
[[email protected] ~]# chmod 770 /data/{students,profs}
[[email protected] ~]# ls -l /data
total 0
drwxrwx---. 2 root profs 6 Jul 2 01:47 profs
drwxrwx---. 2 root students 6 Jul 2 01:47 studentsstep 4: verification :anna Success to /data/profs create a file ,anouk Cannot write owner as anna Permission is 644 The file of .
[[email protected] ~]# id anna
uid=1004(anna) gid=1006(anna) groups=1006(anna),1002(profs)
[[email protected] ~]# su anna -c "touch /data/profs/anna"
[[email protected] ~]# ls -l /data/profs/anna
-rw-r--r--. 1 anna anna 0 Jul 2 01:58 /data/profs/anna
[[email protected]92f238ca5 ~]# su anouk -c "echo anouk > /data/profs/anna"
bash: /data/profs/anna: Permission denied边栏推荐
猜你喜欢
随机推荐
仿《游戏鸟》源码 手游发号评测开服开测合集专区游戏下载网站模板
C语言单向链表练习
【微服务|openfeign】使用openfeign远程调用文件上传接口
Pointer array and array pointer
精品网址导航主题整站源码 wordpress模板 自适应手机端
[microservice openfeign] @feignclient detailed explanation
Keysight N9320B射频频谱分析仪解决轮胎压力监测方案
One click compilation and deployment of MySQL
Asynchronous development process - touch your hand and lead you to realize a promise
(指针)编写函数void fun(int x,int *pp,int *n)
毕业设计项目
Common methods of threads
RHCSA 06 - suid, sgid, sticky bit(待补充)
How to add custom API objects in kubernetes (1)
线程常用的方法
一个漂亮的API文档生成工具
Emlog用户注册插件 价值80元
微信脑力比拼答题小程序_支持流量主带最新题库文件
I.MX6U-ALPHA开发板(模仿STM32驱动开发实验)
沃博联结束战略评估,决定保留表现优异的博姿业务








