当前位置:网站首页>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 .
边栏推荐
- Dot and cross product
- Jeecgboot old version 2 x 3. X how to integrate building block reports?
- windows10安全模式进入循环蓝屏修复
- Test - use case - detail frenzy
- 逻辑的定义
- What is the difference between overload and override?
- String s = new string ("XYZ") how many string objects are created?
- 智能制造时代下,MES管理系统需要解决哪些问题
- Shuttle global levitation button
- Principles and differences between hash and history
猜你喜欢

Detailed process from CPU fetching to sending control and microprogram control principle

Mip-NeRF:抗混叠的多尺度神经辐射场ICCV2021

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

医疗是什么?AI医疗概念解析AI
![[image detection saliency map] calculation of fish eye saliency map based on MATLAB distortion prompt [including Matlab source code 1903]](/img/36/134c573c2198ca6c88a7c179189f1a.jpg)
[image detection saliency map] calculation of fish eye saliency map based on MATLAB distortion prompt [including Matlab source code 1903]

跟着CTF-wiki学pwn——ret2text
![[traffic light identification] traffic light identification based on Matlab GUI [including Matlab source code 1908]](/img/0e/3103c4c5dd664196c85db9b30bcaf5.png)
[traffic light identification] traffic light identification based on Matlab GUI [including Matlab source code 1908]

云原生架构(05)-应用架构演进

Startup process analysis of APP performance optimization

逆向工具IDA、GDB使用
随机推荐
Vulnerability recurrence - redis vulnerability summary
Batch renaming of images by MATLAB
Wechat applet picture verification code display
AI技术在医学领域有什么用?
如何利用数仓创建时序表
[technical grass planting] use the shared image function to realize the offline switching from CVM to LH
Chaos engineering, learn about it
Andorid development art exploration notes (2), cross platform applet development framework
Return, const, volatile keywords
kubernetes之常用核心资源对象
智能制造时代下,MES管理系统需要解决哪些问题
Security | warm tips: security incidents on the cloud have intensified recently. Please do a good job in backup monitoring of cloud security protection!
量化投资模型——高频交易做市模型相关(Avellaneda & Stoikov’s)研究解读&代码资源
测试 - 用例篇 - 细节狂魔
==What is the difference between and equals?
2021-11-23: Regulations: l[1] corresponds to a, l[2] corresponds to B, l[3] corresponds to C
Andorid 开发艺术探索笔记(2),跨平台小程序开发框架
What is the difference between concurrency and parallelism?
Jimureport building block report - table linkage chart topic
2022考研经验分享【初试、择校、复试、调剂、校招与社招】