当前位置:网站首页>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 students
step 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 students
step 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
边栏推荐
猜你喜欢
How to view installed r packages in R language
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
leetcode刷题:二叉树06(对称二叉树)
【愚公系列】2022年7月 Go教学课程 002-Go语言环境安装
微信脑力比拼答题小程序_支持流量主带最新题库文件
R语言中如何查看已安装的R包
Leetcode brush question: binary tree 06 (symmetric binary tree)
苹果CMS仿西瓜视频大气响应式视频模板源码
ModStartBlog 现代化个人博客系统 v5.2.0 源码下载
How to telecommute more efficiently | community essay solicitation
随机推荐
R语言中如何查看已安装的R包
疫情远程办公经验分享| 社区征文
JS realizes the effect of text scrolling marquee
仿《游戏鸟》源码 手游发号评测开服开测合集专区游戏下载网站模板
Boutique website navigation theme whole station source code WordPress template adaptive mobile terminal
TCP-三次握手和四次挥手简单理解
【微服务|openfeign】@FeignClient详解
资深开发人员告诉你,怎样编写出优秀的代码?
User defined path and file name of Baidu editor in laravel admin
EventBridge 在 SaaS 企业集成领域的探索与实践
A beautiful API document generation tool
Leetcode brush question: binary tree 06 (symmetric binary tree)
PPt 教程,如何在 PowerPoint 中将演示文稿另存为 PDF 文件?
leetcode刷题:二叉树08(N叉树的最大深度)
【愚公系列】2022年7月 Go教学课程 002-Go语言环境安装
Keysight N9320B射频频谱分析仪解决轮胎压力监测方案
5张图告诉你:同样是职场人,差距怎么这么大?
十字路口通行优先权,十字路口通行规则图解
Senior developers tell you, how to write excellent code?
FT2000+下LPC中断绑核使用说明