当前位置:网站首页>Basic usage of setfacl command
Basic usage of setfacl command
2022-06-24 00:14:00 【noravinsc】
1、setfacl Use of
setfacl Commands can be used to subdivide linux File permissions under .
chmod The command divides the file permissions into u,g,o Three groups , and setfacl You can set more precise file permissions for each file or directory .
let me put it another way ,setfacl You can control the distribution of permissions more precisely .
such as : Let a user have some permissions on a file .
This is independent of the tradition u,g,o Of rwx The specific permission setting outside the permission is called ACL(Access Control List)
ACL For a single user 、 A single file or directory r,w,x Permission control , It is helpful for the usage of special permission .
Such as , A document , Don't let a single user access .
2、setfacl Usage of
Take an example :
[[email protected] ~]# getfacl test # see acl
file: test
owner: root
group: root
user::rw-
group::r–
other::r–
[[email protected] ~]# setfacl -m u:tank:rx test # to tank The user to test Increase the reading and execution of files acl The rules
[[email protected] ~]# getfacl test # see acl
file: test
owner: root
group: root
user::rw-
user:tank:r-x # Joined
group::r–
mask::r-x
other::r–
[[email protected] ~]# setfacl -m u::rwx test # Set default user , read , Write , Executable
[[email protected] ~]# getfacl test
file: test
owner: root
group: root
user::rwx
user:tank:r-x
group::r–
mask::r-x
other::r–
[[email protected] ~]# setfacl -b test # Clear all acl
[[email protected] ~]# getfacl test
file: test
owner: root
group: root
user::rwx
group::r–
other::r–
[[email protected] ~]# setfacl -m u:tank:rx test # to tank The user to test Increase the reading and execution of files acl The rules
[[email protected] ~]# setfacl -m u:testtank:rx test # to testtank The user to test Increase the reading and execution of files acl The rules
[[email protected] ~]# getfacl test
file: test
owner: root
group: root
user::rwx
user:testtank:r-x
user:tank:r-x
group::r–
mask::r-x
other::r–
[[email protected] ~]# setfacl -x u:tank test # eliminate tank user , Yes test file acl The rules
[[email protected] ~]# getfacl test
file: test
owner: root
group: root
user::rwx
user:testtank:r-x
group::r–
mask::r-x
other::r–
To set up a group, you just need to put setfacl -m u::rwx Medium u Change it to g that will do , About the same .
Set up mask Words ,setfacl -m u::rwx Medium u Change it to m, And this is not for users and groups , The others are about the same .
In the use of -R when , Remember to put it in -m front , Otherwise, you can't
Use -d Words , Will add the default , For the directory .
边栏推荐
- What is the use of AI technology in the medical field?
- Cloud native architecture (05) - Application Architecture Evolution
- What is the difference between concurrency and parallelism?
- Andorid development art exploration notes (2), cross platform applet development framework
- Android 3年外包工面试笔记,有机会还是要去大厂学习提升,android开发实习面试题
- 2021-11-23: Regulations: l[1] corresponds to a, l[2] corresponds to B, l[3] corresponds to C
- [traffic light identification] traffic light identification based on Matlab GUI [including Matlab source code 1908]
- 利用Scanorama高效整合异质单细胞转录组
- 【第25天】给定一个长度为 n 的数组,统计每个数出现的次数 | 计数哈希
- Test - use case - detail frenzy
猜你喜欢

智能制造时代下,MES管理系统需要解决哪些问题

【红绿灯识别】基于matlab GUI红绿灯识别【含Matlab源码 1908期】

kubernetes之常用核心资源对象

985本3Android程序员40天拿下阿里P6口头offer,面试成功后整理了这些面试思路

Usage of go in SQL Server

Tiktok practice ~ password retrieval

Accompanist组件库中文指南 - Glide篇,劲爆

Dependency Inversion Principle

1. < tag dynamic programming and path combination problem > lt.62 Different paths + lt.63 Different paths II

Detailed process from CPU fetching to sending control and microprogram control principle
随机推荐
Common WebGIS Map Libraries
When the IOT network card device is connected to easycvr, how can I view the streaming IP and streaming time?
Dart series: using generators in dart
Design of message push platform
测试 - 用例篇 - 细节狂魔
What is medical treatment? AI medical concept analysis AI
Fix blog theme php8 compatibility and optimize dark mode
Expander+listbox of WPF effect
Android 3年外包工面试笔记,有机会还是要去大厂学习提升,android开发实习面试题
Drag and drop report design - new features of jimureport 1.4.0
跟着CTF-wiki学pwn——ret2text
[new cos series] | object storage cos data Vientiane CI processing special data processing resource package 4.5 folded into a big gift package!
Android - JNI 开发你所需要知道的基础,Android工程师面试题
Mip-NeRF:抗混叠的多尺度神经辐射场ICCV2021
Another short video app with high imitation and eye opening
Basic usage of oushudb database (medium)
What do NLP engineers do? What is the work content?
Use of reverse tools IDA and GDB
Android 3年外包工面试笔记,有机会还是要去大厂学习提升,作为一个Android程序员
[technique of planting grass] spit blood and clean up, and take you to collect goose feathers in a fancy way! Do not spread!!!