From d2d40f3d73c8f00ac4a1bb52c8790033fb31af29 Mon Sep 17 00:00:00 2001 From: LeLawnGames Date: Wed, 11 Dec 2024 02:50:50 -0500 Subject: [PATCH] Added Synology & Permissions --- cli/permissions.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ cli/syno.md | 8 ++++++++ readme.md | 4 +++- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 cli/permissions.md create mode 100644 cli/syno.md diff --git a/cli/permissions.md b/cli/permissions.md new file mode 100644 index 0000000..01623db --- /dev/null +++ b/cli/permissions.md @@ -0,0 +1,45 @@ +# Setting Folder Permissions + +## Symbolic Notation + +'''bash +chmod u+rwx foldername # Give owner read, write, execute +chmod g+rx foldername # Give group read and execute +chmod o-rwx foldername # Remove all permissions for others +chmod -R u+rw foldername # Recursively give read/write to owner +''' + +## Numeric Notation + +'''bash +chmod 755 foldername # rwxr-xr-x (owner: all, group: read+execute, others: read+execute) +chmod 700 foldername # rwx------ (owner: all, no permissions for group or others) +chmod 777 foldername # rwxrwxrwx (all permissions for everyone - use cautiously) +''' + +The -R flag makes it recursive within every subfolder beneath the folder referenced. + +Common permission numbers: + +755: Owner can do anything, others can read and execute +644: Owner can read/write, others can read +700: Only owner has access +777: Everyone has full access (generally avoid this) + +## Setting Permissions to a Specific User + +Use chown to set permissions to a specific user. (You'll almost always need to run with sudo) + +'''bash +# Change owner of a file/folder +chown username foldername + +# Change both owner and group +chown username:groupname foldername + +# Recursively change ownership (include all files and subfolders) +chown -R username foldername + +# Change owner and group recursively +chown -R username:groupname foldername +''' \ No newline at end of file diff --git a/cli/syno.md b/cli/syno.md new file mode 100644 index 0000000..6e1bc87 --- /dev/null +++ b/cli/syno.md @@ -0,0 +1,8 @@ +# Docker Permissions + +You've saved the permissions run as fix-docker-permissions, so you can call it via CLI like this: +'''bash +sudo fix-docker-permissions +''' + +It's also saved as a recurring task in Task Scheduler. \ No newline at end of file diff --git a/readme.md b/readme.md index 76fc58b..e1880e9 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,6 @@ # A physical mind palace to combat my poor memory ## Command Line Tools -- [ZIP Commands](cli/zip.md) \ No newline at end of file +- [ZIP Commands](cli/zip.md) +- [Misc. Synology Commands](cli/syno.md) +- [Setting Permissions](cli/permissions.md) \ No newline at end of file