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`.