当前位置:网站首页>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边栏推荐
猜你喜欢

最长递增子序列问题(你真的会了吗)

苹果CMS仿西瓜视频大气响应式视频模板源码

Architecture practice camp - graduation project of module 9 of phase 6

2021 RSC | Drug–target affinity prediction using graph neural network and contact maps

leetcode刷题:二叉树09(二叉树的最小深度)

02 specific implementation of LS command

Architecture training graduation design + summary

旭化成首次参展第五届中国国际进口博览会(5th CIIE)

什么是上下文?

Select function variable column name in dplyr of R language
随机推荐
戳气球和布尔运算问题(巨难)
Lnk2038 detected a mismatch of "runtimelibrary": the value "md_dynamicrelease" does not match the value "mdd_dynamicdebug" (in main.obj)
UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x98 in position 1093: illegal multibyte sequence
MIN_RTO 对话
Common methods of threads
博朗与Virgil Abloh于2021年为纪念博朗品牌100周年而联合打造的“功能性艺术”将在博物馆展出Abloh作品期间首次亮相
Imitation of "game bird" source code, mobile game issue evaluation, open service, open test collection, game download website template
Unity资源路径
架构训练毕业设计+总结
程序员远程办公喜忧参半| 社区征文
Application scheme of Puyuan ds1000z series digital oscilloscope in communication principle experiment
01 QEMU starts the compiled image vfs: unable to mount root FS on unknown block (0,0)
dried food! Generation of rare samples based on GaN
Katalon uses script to query list size
架构实战营 - 第 6 期 模块九之毕业设计
DP83848+网线热拔插
Flink learning 6: programming model
RHCSA 04 - 进程管理
PPt 教程,如何在 PowerPoint 中将演示文稿另存为 PDF 文件?
多位科技公司创始人向Entrepreneur First提供高达1.58亿美元的C轮融资,协助其投资下一代全球创新者