chore: improved folder structure

This commit is contained in:
Michele Cereda
2023-09-18 00:37:48 +02:00
parent bcd597f9ea
commit 66428e7670
5 changed files with 154 additions and 77 deletions

View File

@@ -3,18 +3,37 @@
## TL;DR
```sh
# Copy permissions from another file.
# Only available in GNU cp.
chmod --reference 'reference-file' 'changed-file'
# Change permissions of files or directories.
chmod '775' "path/to/dir"
chmod 'u=rw' "path/to/dir"
chmod 'go+x' "path/to/file"
# Set 'setuid' bit.
chmod '04755' "path/to/dir"
chmod 'u-s' "path/to/file"
# Set 'setgid' bit.
chmod '02775' "path/to/dir"
chmod 'g+s' "path/to/file"
# Set 'sticky' bit.
# Allows only the *owner* to change content and delete.
chmod '01775' "path/to/dir"
chmod 'a+t' "path/to/file"
# Set combinations of 'set*id' and 'sticky' bits.
chmod '03775' "path/to/setgid/and/sticky/dir"
chmod '05664' "path/to/setuid/and/sticky/file"
chmod '07644' "path/to/setuid/setgid/and/sticky/file"
```
## Sources
- [18 selected super-useful Linux one-liners]
- [File permissions and attributes]
<!--
References
-->
<!-- Others -->
[18 selected super-useful linux one-liners]: https://medium.com/codex/18-selected-super-useful-linux-one-liners-398ba6d20f8c
[file permissions and attributes]: https://wiki.archlinux.org/title/File_permissions_and_attributes