Skip to Main Content
Unix in a Nutshell, 4th Edition
book

Unix in a Nutshell, 4th Edition

by Arnold Robbins
October 2005
Intermediate to advanced content levelIntermediate to advanced
908 pages
46h 42m
English
O'Reilly Media, Inc.
Content preview from Unix in a Nutshell, 4th Edition

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning the Unix Operating System, 5th Edition

Learning the Unix Operating System, 5th Edition

John Strang, Grace Todino, Jerry Peek
UNIX and Linux System Administration Handbook, 5th Edition

UNIX and Linux System Administration Handbook, 5th Edition

Trent R. Hein, Evi Nemeth, Garth Snyder, Ben Whaley, Dan Mackin

Publisher Resources

ISBN: 0596100299Errata Page