1/16
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
what is ACL
allows you to give permissions to any group or user
use of ACL
when a member isn’t apart of the group, but you still want to give them permission
command to assign and remove ACL permissions
setfacl
getfacl
add ACL permission for user
setfacl -m u:<user>:rwx </path/to/file>
add ACL permissions for a single group
setfacl -m g:group:rwx /path/to/file
allow all files or directories to inherit from the directory it is within
setfacl -R -m u </path/to/file>
remove a specific ACL entry
setfacl -x u:<user>: </path/to/file>
remove all ACL’s
setfacl -b <path/to/file>
create an ACL to give iafzal read and write permissions
setfacl -m u:iafzal:rw /tmp/file
verify acl changes
getfacl /path/to/file
remove acl
setfacl -rm <entry> /path/to/file
remove acl for specific user
setfacl -x u:username filename
remove a specific group’s acl
setfacl -x g:groupname filename
basic syntax for setfacl
setfacl -m u:username:permissions filename
-m: Modify ACL
u:username: Assigns permissions to a specific user
permissions: Can be r (read), w (write), x (execute)
Removing ACL syntax
To remove an ACL for a specific user, use:
-> setfacl -x u:username filename
To remove all ACLs from a file or directory:
-> setfacl -b filename
allow ACL the same permissions to be applied to all files and subdirectories.
setfacl -R -m u:bob:rwx directoryname
This command grants read, write, and execute permissions to bob for all files and subdirectories in the directory.
Default ACLs can be set on directories to ensure that newly created files inherit certain permissions.
setfacl -m d:u:username:permissions directoryname
The d: prefix indicates that this is a default ACL. Any new files created in this directory will automatically inherit the specified permissions.