[root@kvm8 ~]# chmod --help
Usage: chmod [OPTION]... MODE[,MODE]... FILE...
or: chmod [OPTION]... OCTAL-MODE FILE...
or: chmod [OPTION]... --reference=RFILE FILE...
Change the mode of each FILE to MODE.
With --reference, change the mode of each FILE to that of RFILE.
-c, --changes like verbose but report only when a change is made
-f, --silent, --quiet suppress most error messages
-v, --verbose output a diagnostic for every file processed
--dereference affect the referent of each symbolic link,
rather than the symbolic link itself
-h, --no-dereference affect each symbolic link, rather than the referent
--no-preserve-root do not treat '/' specially (the default)
--preserve-root fail to operate recursively on '/'
--reference=RFILE use RFILE's mode instead of specifying MODE values.
RFILE is always dereferenced if a symbolic link.
-R, --recursive change files and directories recursively
The following options modify how a hierarchy is traversed when the -R
option is also specified. If more than one is specified, only the final
one takes effect. '-H' is the default.
-H if a command line argument is a symbolic link
to a directory, traverse it
-L traverse every symbolic link to a directory
encountered
-P do not traverse any symbolic links
--help display this help and exit
--version output version information and exit
Each MODE is of the form '[ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=][0-7]+'.
GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Full documentation <https://www.gnu.org/software/coreutils/chmod>
or available locally via: info '(coreutils) chmod invocation'
chmod [ -R ] xyz 檔案或目錄
chmod [ -R ] u = r 檔案或目錄
g + w 檔案或目錄
o - x 檔案或目錄
a 檔案或目錄
chmod u=rwx,go=rx 檔案或目錄
chmod a-x 檔案或目錄
xyz 為三組 rwx 屬性數值之加總。
r : 4
w : 2
x : 1
-rwxr-xr-- 之屬性數值為 754。
u : user
g : group
o : other
a : all
+ : 加入
- : 除去
= : 設定
chmod u+w -R abc