@@ -7,7 +7,7 @@ Access control list (ACL) provides an additional, more flexible permission mecha
To show permissions, use:
```code
# getfacl <file/dir>
$ getfacl <file/dir>
```
### Examples
...
...
@@ -15,13 +15,13 @@ To show permissions, use:
Set all permissions for user john to file named testfile:
```code
# setfacl -m "u:john:rwx" testfile
$ setfacl -m "u:john:rwx" testfile
```
Check permissions:
```code
# getfacl testfile
$ getfacl testfile
# file: testfile
# owner: someone
# group: someone
...
...
@@ -35,13 +35,13 @@ other::r--
Change permissions for user john:
```code
# setfacl -m "u:john:r-x" testfile
$ setfacl -m "u:john:r-x" testfile
```
Check permissions:
```code
# getfacl testfile
$ getfacl testfile
# file: testfile
# owner: someone
# group: someone
...
...
@@ -55,13 +55,13 @@ other::r--
Remove all ACL entries:
```code
# setfacl -b testfile
$ setfacl -b testfile
```
Check permissions:
```code
# getfacl testfile
$ getfacl testfile
# file: testfile
# owner: someone
# group: someone
...
...
@@ -102,43 +102,43 @@ To apply operations to all files and directories recursively, append the `-R/--r
To set permissions for a user (user is either the user name or ID):
```code
# setfacl -m "u:user:permissions" <file/dir>
$ setfacl -m "u:user:permissions" <file/dir>
```
To set permissions for a group (group is either the group name or ID):
```code
# setfacl -m "g:group:permissions" <file/dir>
$ setfacl -m "g:group:permissions" <file/dir>
```
To set permissions for others:
```code
# setfacl -m "other:permissions" <file/dir>
$ setfacl -m "other:permissions" <file/dir>
```
To allow all newly created files or directories to inherit entries from the parent directory (this will not affect files which will be copied into the directory):
```code
# setfacl -dm "entry" <dir>
$ setfacl -dm "entry" <dir>
```
To remove a specific entry:
```code
# setfacl -x "entry" <file/dir>
$ setfacl -x "entry" <file/dir>
```
To remove the default entries:
```code
# setfacl -k <file/dir>
$ setfacl -k <file/dir>
```
To remove all entries (entries of the owner, group and others are retained):