mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore: improve notes for permissions and ownership
This commit is contained in:
@@ -17,9 +17,10 @@ BSD systems use NFSv4 ACLs by default in ZFS.
|
|||||||
List of **NFSv4** [permission tags][syntax descriptions for setting acls] and [inheritance options][acl inheritance].
|
List of **NFSv4** [permission tags][syntax descriptions for setting acls] and [inheritance options][acl inheritance].
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Install the tool.
|
# Install the tools.
|
||||||
apt install 'acl'
|
apt install 'acl'
|
||||||
dnf install 'acl'
|
dnf install 'acl'
|
||||||
|
zypper install 'acl'
|
||||||
|
|
||||||
# Show ACLs.
|
# Show ACLs.
|
||||||
getfacl 'path/to/file'
|
getfacl 'path/to/file'
|
||||||
@@ -127,11 +128,15 @@ setfacl -a '5' 'everyone@:r-x---a-R-c---:-d-----:allow' 'path/to/dir'
|
|||||||
- [`setfacl` FreeBSD manual page][setfacl freebsd manual page]
|
- [`setfacl` FreeBSD manual page][setfacl freebsd manual page]
|
||||||
- [Syntax descriptions for setting ACLs]
|
- [Syntax descriptions for setting ACLs]
|
||||||
- [ACL inheritance]
|
- [ACL inheritance]
|
||||||
|
- [`chmod`][chmod] for how to force new files to be owned by specific users or groups
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
References
|
References
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- Knowledge base -->
|
||||||
|
[chmod]: chmod.md
|
||||||
|
|
||||||
<!-- Others -->
|
<!-- Others -->
|
||||||
[access control lists (acl) in linux]: https://www.geeksforgeeks.org/access-control-listsacl-linux/
|
[access control lists (acl) in linux]: https://www.geeksforgeeks.org/access-control-listsacl-linux/
|
||||||
[acl inheritance]: https://docs.oracle.com/cd/E19253-01/819-5461/gbaax/index.html
|
[acl inheritance]: https://docs.oracle.com/cd/E19253-01/819-5461/gbaax/index.html
|
||||||
|
|||||||
@@ -9,10 +9,12 @@ chmod 'u=rw' "path/to/dir"
|
|||||||
chmod 'go+x' "path/to/file"
|
chmod 'go+x' "path/to/file"
|
||||||
|
|
||||||
# Set 'setuid' bit.
|
# Set 'setuid' bit.
|
||||||
|
# Set on directories, forces new files to be owned by the same user by default.
|
||||||
chmod '04755' "path/to/dir"
|
chmod '04755' "path/to/dir"
|
||||||
chmod 'u-s' "path/to/file"
|
chmod 'u-s' "path/to/file"
|
||||||
|
|
||||||
# Set 'setgid' bit.
|
# Set 'setgid' bit.
|
||||||
|
# Set on directories, forces new files to be owned by the same group by default.
|
||||||
chmod '02775' "path/to/dir"
|
chmod '02775' "path/to/dir"
|
||||||
chmod 'g+s' "path/to/file"
|
chmod 'g+s' "path/to/file"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user