2016-12-13 14:50:24 +00:00
|
|
|
# setfacl
|
|
|
|
|
2016-12-13 16:50:54 +00:00
|
|
|
> Set file access control lists (ACL).
|
2022-03-21 17:07:48 +00:00
|
|
|
> More information: <https://manned.org/setfacl>.
|
2016-12-13 14:50:24 +00:00
|
|
|
|
2024-02-06 14:16:32 +00:00
|
|
|
- [M]odify ACL of a file for user with read and write access:
|
2016-12-13 14:50:24 +00:00
|
|
|
|
2024-02-06 14:16:32 +00:00
|
|
|
`setfacl --modify u:{{username}}:rw {{path/to/file_or_directory}}`
|
2016-12-13 14:50:24 +00:00
|
|
|
|
2024-02-06 14:16:32 +00:00
|
|
|
- [M]odify [d]efault ACL of a file for all users:
|
2016-12-13 14:50:24 +00:00
|
|
|
|
2024-02-06 14:16:32 +00:00
|
|
|
`setfacl --modify --default u::rw {{path/to/file_or_directory}}`
|
2016-12-13 14:50:24 +00:00
|
|
|
|
2021-08-12 19:23:20 +01:00
|
|
|
- Remove ACL of a file for a user:
|
2016-12-13 14:50:24 +00:00
|
|
|
|
2024-02-06 14:16:32 +00:00
|
|
|
`setfacl --remove u:{{username}} {{path/to/file_or_directory}}`
|
2016-12-13 14:50:24 +00:00
|
|
|
|
|
|
|
- Remove all ACL entries of a file:
|
|
|
|
|
2024-02-06 14:16:32 +00:00
|
|
|
`setfacl --remove-all {{path/to/file_or_directory}}`
|