Skip to content
Snippets Groups Projects
Commit 1a8cdb8c authored by Jan Siwiec's avatar Jan Siwiec
Browse files

Update standard-file-acl.md

parent fd2ce1cc
No related branches found
No related tags found
1 merge request!323extended-acls-storage-section
# Standard File ACL
Access control list (ACL) provides an additional, more flexible permission mechanism for file systems. It is designed to assist with UNIX file permissions. ACL allows you to give permissions for any user or group to any disk resource. For more information, see the [wikipedia][1] page.
Access control list (ACL) provides an additional, more flexible permission mechanism for file systems. It is designed to assist with UNIX file permissions. ACL allows you to give permissions for any user or group to any disk resource.
## Show ACL
......@@ -8,40 +8,59 @@ To show permissions, use:
```code
# getfacl <file/dir>
Examples
Set all permissions for user johnny to file named abc:
```
### Examples
Set all permissions for user John to file named abc:
```code
# setfacl -m "u:John:rwx" abc
```
# setfacl -m "u:johnny:rwx" abc
Check permissions:
```code
# getfacl abc
# file: abc
# owner: someone
# group: someone
user::rw-
user:johnny:rwx
user:John:rwx
group::r--
mask::rwx
other::r--
Change permissions for user johnny:
```
Change permissions for user John:
```code
# setfacl -m "u:John:r-x" abc
```
# setfacl -m "u:johnny:r-x" abc
Check permissions:
```code
# getfacl abc
# file: abc
# owner: someone
# group: someone
user::rw-
user:johnny:r-x
user:John:r-x
group::r--
mask::r-x
other::r--
```
Remove all ACL entries:
```code
# setfacl -b abc
```
Check permissions:
```code
# getfacl abc
# file: abc
# owner: someone
......@@ -49,11 +68,18 @@ Check permissions:
user::rw-
group::r--
other::r--
Output of ls command
You will notice that there is an ACL for a given file because it will exhibit a + (plus sign) after its Unix permissions in the output of ls -l.
```
## Output of ls command
You will notice that there is an ACL for a given file because it will exhibit `+` after its Unix permissions in the output of `ls -l`.
```code
$ ls -l /dev/audio
crw-rw----+ 1 root audio 14, 4 nov. 9 12:49 /dev/audio
```
```code
$ getfacl /dev/audio
getfacl: Removing leading '/' from absolute path names
# file: dev/audio
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment