Name
chmod
Synopsis
chmod [options
]mode files
Change the access mode of one or more
files. Only the owner of a file or a
privileged user may change its mode. Create
mode by concatenating the characters from
who, opcode, and
permission. who is
optional (if omitted, default is a
); choose only one
opcode.
Common Options
-f
,--quiet
,--silent
Do not print error messages about files that cannot be changed.
-R
,--recursive
Recursively descend through the directory, including subdirectories and symbolic links, setting the specified group ID as it proceeds. The last of
-H
,-L
, and-P
takes effect when used with-R
.
GNU/Linux and Mac OS X Option
-v
,--verbose
Verbosely describe ownership changes.
GNU/Linux Options
-c
,--changes
Print information about files that are changed.
-
--no-preserve-root
Do not treat the root directory, /, specially (the default).
-
--preserve-root
Do not operate recursively on /, the root directory.
-
--reference=
filename
Change the group to that associated with filename. In this case, newgroup is not specified.
Mac OS X Options
+a
,+a#
,-a
,=a#
Parse, order, remove or rewrite ACL entries. See the chmod(1) manpage for more information.
-
-C
Exit nonzero if any files have ACLs in noncanonical order.
-
-E
Read new ACL information from standard input. If it parses correctly, use it to replace the existing ACL information.
-
-H
When used with
-R
, if a command-line argument is a symbolic link to a directory, recursively traverse the directory.-
-i
Remove the “inherited” bit from all entries in ...
Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.