The ACL can be modified using the setfacl command.
The ACL can be modified using the `setfacl` command.
You can list file/directory permission changes without modifying the permissions (i.e. dry-run) by appending the `--test` flag.
To apply operations to all files and directories recursively, append the `-R/--recursive` argument.
You can list file/directory permission changes without modifying the permissions (i.e. dry-run) by appending the --test flag.
To apply operations to all files and directories recursively, append the -R/--recursive argument.
To set permissions for a user (user is either the user name or ID):
```code
# 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>
```
To set permissions for others:
```code
# 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>
```
To remove a specific entry:
```code
# setfacl -x "entry" <file/dir>
```
To remove the default entries:
```code
# setfacl -k <file/dir>
```
To remove all entries (entries of the owner, group and others are retained):