HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)

c
chmod(1) chmod(1)
chmod a+x file
Assign read and execute permission to everybody, and set the set-user-ID bit:
chmod a=rx,u+s file
Assign read and write permission to the file owner, and read permission to everybody else:
chmod u=rw,go=r file
or the obsolescent form:
chmod 644 file
Traverse a directory subtree making all regular files readable by user and group only, and all executables
and directories executable (searchable) by everyone:
chmod -R ug+r,o-r,a+X pathname
If the current value of umask is 020
(umask -S displays u=rwx,g=rx,o=rwx
; do not change write
permission for group) and the current permissions for file
mytest are 444 (a=r), displayed by ls -l as
-r--r--r--
, then the command
chmod +w mytest
sets the permissions to 646 (uo=rw,g=r), displayed by ls -l as -rw-r--rw-
.
If the current value of
umask is 020 (umask -S displays u=rwx,g=rx,o=rwx
; do not change write
permission for group) and the current permissions for file
mytest are 666 (a=rw), displayed by
ls -l as
-rw-rw-rw-, then the command
chmod -w mytest
sets the permissions to 464 (uo=r,g=rw), displayed by ls -l as -r--rw-r--
.
DEPENDENCIES
The
-A option causes chmod to fail on file systems that do not support ACLs.
AUTHOR
chmod was developed by AT&T and HP.
SEE ALSO
chacl(1), ls(1), umask(1), chmod(2), acl(5), aclv(5).
STANDARDS CONFORMANCE
chmod: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2
Section 186 Hewlett-Packard Company 3 HP-UX 11i Version 1: September 2005