Added acl notes to the knowledge base

This commit is contained in:
Michele Cereda
2022-04-20 20:35:12 +02:00
parent d613b90794
commit 79beffc12d

30
knowledge base/acl.md Normal file
View File

@@ -0,0 +1,30 @@
# Access Control Lists assignment
## TL;DR
```shell
# show acls of file test/declarations.h
getfacl test/declarations.h
# set permissions for user awe-user
setfacl -m u:awe-user:rwx test/declarations.h
# set permissions for group awe-group
setfacl -m "g:awe-group:r-x" test/declarations.h
# make children files and directories inherit acls
# sets default acls
setfacl -d -m u:dummy:rw test
# remove a specific acl
setfacl -x u:dummy:rw test
# remove all acls
setfacl -b test/declarations.h
```
## Sources
- [Access Control Lists (ACL) in Linux]
[access control lists (acl) in linux]: https://www.geeksforgeeks.org/access-control-listsacl-linux/