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

Update standard-file-acl.md

parent fa4e9449
No related branches found
No related tags found
1 merge request!323extended-acls-storage-section
......@@ -94,32 +94,53 @@ other::---
## Modify ACL
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):
```code
# setfacl -b <file/dir>
```
Source: [wiki.archlinux.org][1]
[1]: https://wiki.archlinux.org/title/Access_Control_Lists
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment