Permissions and owners
The setfacl command
Grants fine-grained permissions to specific users or groups without changing the owner or the basic mode.
Syntax
setfacl -m u:usuario:permisos archivoMost useful options
-mModifies an ACL entry-xRemoves an ACL entry-bRemoves all ACLsCopy-ready examples
$ touch informe.txt && setfacl -m u:root:rw informe.txt && getfacl informe.txtGrant permission to a userYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- An ACL can make ls -l show a + at the end of the permissions.
FAQ
When do I need ACL instead of chmod?
When you want to give access to one specific person without touching the other permissions.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course