当前位置:网站首页>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边栏推荐
- ctf-pikachu-XSS
- Touch your hand and bring you a commonjs specification
- Pointer array and array pointer
- Leetcode skimming: binary tree 08 (maximum depth of n-ary tree)
- NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
- I.MX6U-ALPHA开发板(模仿STM32驱动开发实验)
- Exercises in quantum mechanics
- How to view installed r packages in R language
- RPC技术
- Small record of thinking
猜你喜欢

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

Main applications of TDK lambda power supply

Lnk2038 detected a mismatch of "runtimelibrary": the value "md_dynamicrelease" does not match the value "mdd_dynamicdebug" (in main.obj)

What does software testing do? Find defects and improve the quality of software

Distributed system: what, why, how

一个漂亮的API文档生成工具

leetcode刷题:二叉树08(N叉树的最大深度)

NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线

Understand the principle of bytecode enhancement technology through the jvm-sandbox source code

Wechat brain competition answer applet_ Support the flow main belt with the latest question bank file
随机推荐
Flink learning 6: programming model
毕业三年,远程半年 | 社区征文
[microservice openfeign] use openfeign to remotely call the file upload interface
普源DS1000Z系列数字示波器在通信原理实验中的应用方案
Leetcode 121 best time to buy and sell stock (simple)
(pointer) write a function to compare the size of strings by yourself, which is similar to StrCmp.
Small record of thinking
统计遗传学:第三章,群体遗传
【微服务|openfeign】@FeignClient详解
RHCSA 01 - 创建分区与文件系统
Touch and take you to implement an EventEmitter
Redis:集合Set类型数据的操作命令
十字路口通行优先权,十字路口通行规则图解
C语言双向链表初版
批处理初识
一个漂亮的API文档生成工具
Virtual commodity account trading platform source code_ Support personal QR code collection
(指针)编写函数void fun(int x,int *pp,int *n)
FT2000+下LPC中断绑核使用说明
02 specific implementation of LS command