当前位置:网站首页>Rhsca day 11 operation
Rhsca day 11 operation
2022-07-04 10:18:00 【Attiude】
Homework today :
1. create a file , And give authority 611( Two ways , A kind of guoa, A kind of nnn)
[[email protected] ~]# chmod 755 chom_dir
[[email protected] ~]# chmod u=rwx,go=rx chom_dir
2. Create directory , And give authority 755( Two ways , A kind of guoa, A kind of nnn)
[[email protected] ~]# chmod 611 chom_dir.txt
[[email protected] ~]# chmod u=rw,go=x chom_dir.txt
3. create a file , And modify the owner and group of the file to other users

4. Set up suid, Set for file suid( Two ways u+s and nnnn) The way
[[email protected] ~]# chmod u+s chom_test.txt
[[email protected] ~]# ll chom_test.txt
-rwSr--r--. 1 sarah sarah 0 11 month 26 00:00 chom_test.txt
[[email protected] ~]# chmod u+x chom_test.txt
[[email protected] ~]# ll chom_test.txt
-rwsr--r--. 1 sarah sarah 0 11 month 26 00:00 chom_test.txt
[[email protected] ~]# chmod 4774 chom_test.txt
[[email protected] ~]# ll chom_test.txt
-rwsrwxr--. 1 sarah sarah 0 11 month 26 00:00 chom_test.txt
5. Set up sgid, Set for file sgid( Two ways g+s and nnnn) The way
[[email protected] ~]# chmod g+x chmo_test2
[[email protected] ~]# chmod g+s chmo_test2
[[email protected] ~]# ls -dl chmo_test2/
drwxr-sr-x. 2 root root 6 11 month 26 00:29 chmo_test2/
6. Set up sbit, Set for directory sbit( Two ways o+t and nnnn) The way
[[email protected] ~]# touch chmo_test3
[[email protected] ~]# chmod o+x chmo_test3
[[email protected] ~]# chmod o+t chmo_test3
[[email protected] ~]# ll chmo_test3
-rw-r--r-t. 1 root root 0 11 month 26 00:42 chmo_test3
[[email protected] ~]# chmod 1645 chmo_test3
[[email protected] ~]# ll chmo_test3
-rw-r--r-t. 1 root root 0 11 month 26 00:42 chmo_test3
7. create a file , Query file acl
Set for file acl The user is testuser1 Permission is rwx
Set for file acl Of mask: Permission is r-x
[[email protected] ~]# useradd testuser1
[[email protected] ~]# touch acl_test01
[[email protected] ~]# getfacl acl_test01
# file: acl_test01
# owner: root
# group: root
user::rw-
group::r--
other::r--
[[email protected] ~]# setfacl -m u:testuser1:rwx acl_test01
[[email protected] ~]# getfacl acl_test01
# file: acl_test01
# owner: root
# group: root
user::rw-
user:testuser1:rwx
group::r--
mask::rwx
other::r--
[[email protected] ~]# setfacl -m m:r-x acl_test01
[[email protected] ~]# getfacl acl_test01
# file: acl_test01
# owner: root
# group: root
user::rw-
user:testuser1:rwx #effective:r-x
group::r--
mask::r-x
other::r--
边栏推荐
- What are the advantages of automation?
- [FAQ] summary of common causes and solutions of Huawei account service error 907135701
- Golang type comparison
- Machine learning -- neural network (IV): BP neural network
- MySQL develops small mall management system
- Kubernetes CNI 插件之Fabric
- 浅谈Multus CNI
- Hands on deep learning (46) -- attention mechanism
- Hands on deep learning (32) -- fully connected convolutional neural network FCN
- libmysqlclient.so.20: cannot open shared object file: No such file or directory
猜你喜欢

C语言指针面试题——第二弹

C language pointer interview question - the second bullet

Delayed message center design

Latex error: missing delimiter (. Inserted) {\xi \left( {p,{p_q}} \right)} \right|}}

If the uniapp is less than 1000, it will be displayed according to the original number. If the number exceeds 1000, it will be converted into 10w+ 1.3k+ display

品牌连锁店5G/4G无线组网方案

Realsense of d435i, d435, d415, t265_ Matching and installation of viewer environment

C language pointer classic interview question - the first bullet

智能网关助力提高工业数据采集和利用

How can Huawei online match improve the success rate of player matching
随机推荐
Hands on deep learning (45) -- bundle search
Exercise 9-1 time conversion (15 points)
Lavel document reading notes -how to use @auth and @guest directives in lavel
Kotlin 集合操作汇总
Hands on deep learning (37) -- cyclic neural network
C language pointer classic interview question - the first bullet
Hands on deep learning (35) -- text preprocessing (NLP)
【FAQ】华为帐号服务报错 907135701的常见原因总结和解决方法
System.currentTimeMillis() 和 System.nanoTime() 哪个更快?别用错了!
MongoDB数据日期显示相差8小时 原因和解决方案
Latex learning insertion number - list of filled dots, bars, numbers
How can people not love the amazing design of XXL job
What is devsecops? Definitions, processes, frameworks and best practices for 2022
A little feeling
Today's sleep quality record 78 points
Sword finger offer 31 Stack push in and pop-up sequence
Vanishing numbers
Hands on deep learning (32) -- fully connected convolutional neural network FCN
PHP code audit 3 - system reload vulnerability
Summary of reasons for web side automation test failure