2011-05-27 18:48:07 -04:00
|
|
|
.TH CHMOD 1 sbase\-VERSION
|
|
|
|
.SH NAME
|
|
|
|
chmod \- change file mode
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B chmod
|
2011-06-02 15:38:48 -04:00
|
|
|
.RB [ \-Rr ]
|
2011-06-10 19:30:07 -04:00
|
|
|
.I octal
|
|
|
|
.RI [ file ...]
|
|
|
|
.P
|
|
|
|
.B chmod
|
|
|
|
.RB [ \-Rr ]
|
|
|
|
.RB [ ugoa ][ +-= ][ rwxs ]
|
2011-05-27 18:48:07 -04:00
|
|
|
.RI [ file ...]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.B chmod
|
2011-06-10 19:30:07 -04:00
|
|
|
changes the file mode for the given files.
|
2011-05-27 18:48:07 -04:00
|
|
|
.P
|
2011-06-10 19:30:07 -04:00
|
|
|
If the mode is an
|
|
|
|
.I octal
|
|
|
|
number, the modes are set according to that number's comprising bits. The first
|
|
|
|
digit defines the setuid (4) and setgid (2) attributes. The second digit
|
|
|
|
defines the owner's permissions: read (4), write (2), and execute (1); the third
|
|
|
|
defines permissions for others in the file's group; and the fourth for all other
|
|
|
|
users. Leading zeroes may be omitted.
|
|
|
|
.P
|
|
|
|
Alternatively the mode may be symbolic. The symbol meanings are:
|
|
|
|
.TP
|
|
|
|
.B u
|
|
|
|
modifies owner permissions.
|
|
|
|
.PD 0
|
|
|
|
.TP
|
|
|
|
.B g
|
|
|
|
modifies group permissions.
|
|
|
|
.TP
|
|
|
|
.B o
|
|
|
|
modifies other user permissions.
|
|
|
|
.TP
|
|
|
|
.B a
|
|
|
|
modifies all user permissions.
|
|
|
|
.PD
|
|
|
|
.TP
|
|
|
|
.B +
|
|
|
|
adds the given permissions to the mode.
|
|
|
|
.PD 0
|
|
|
|
.TP
|
|
|
|
.B -
|
|
|
|
removes the given permissions from the mode.
|
|
|
|
.TP
|
|
|
|
.B =
|
|
|
|
sets the mode to the given permissions.
|
|
|
|
.PD
|
|
|
|
.TP
|
|
|
|
.B r
|
|
|
|
read permissions.
|
|
|
|
.PD 0
|
|
|
|
.TP
|
|
|
|
.B w
|
|
|
|
write permissions.
|
|
|
|
.TP
|
|
|
|
.B x
|
|
|
|
execute permissions.
|
|
|
|
.TP
|
|
|
|
.B s
|
|
|
|
setuid and setgid attributes.
|
|
|
|
.PD
|
2011-05-27 18:48:07 -04:00
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
2011-06-02 15:38:48 -04:00
|
|
|
.B \-R, \-r
|
2011-05-27 18:48:07 -04:00
|
|
|
change directory mode recursively.
|
|
|
|
.SH SEE ALSO
|
|
|
|
.IR chmod (2)
|