From 003da78bb79b3cf7568f40acd502842b22b6fa10 Mon Sep 17 00:00:00 2001 From: oleg20111511 Date: Mon, 2 Mar 2026 19:45:01 +0200 Subject: [PATCH] Add chmod notes --- Software Notes/linux/chmod.txt | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Software Notes/linux/chmod.txt diff --git a/Software Notes/linux/chmod.txt b/Software Notes/linux/chmod.txt new file mode 100644 index 0000000..83d3c27 --- /dev/null +++ b/Software Notes/linux/chmod.txt @@ -0,0 +1,43 @@ +Symbolic mode: +chmod who-+=permission filename +"who-+=permission" section can be repeated for different combos with a comma , + +who: +u - user +g - group +o - other +a - all + +permissions: +r - read +w - write +x - execute +X - execute only if the file is a directory or already has execute permission for some user +s - set user or group ID on execution (????) +t - sticky bit (????) + +chmod u=rwx,g=rx,o-rwx filename + + + +Number mode +chmod user_permission..group_permission..other_permission filename +0 <= permission <= 7 + +permissions: +>>> for i in range (8): +... print(i, bin(i)) +... +0 0b000 +1 0b001 +2 0b010 +3 0b011 +4 0b100 +5 0b101 +6 0b110 +7 0b111 +n __rwx + +chmod 754 filename +binary breakdown: +chmod 111 101 100 filename