sbase/chmod.1

75 lines
1.3 KiB
Groff
Raw Normal View History

2011-05-27 22:48:07 +00:00
.TH CHMOD 1 sbase\-VERSION
.SH NAME
chmod \- change file mode
.SH SYNOPSIS
.B chmod
2012-05-25 20:52:01 +00:00
.RB [ \-r ]
2011-06-10 23:30:07 +00:00
.I octal
.RI [ file ...]
.P
.B chmod
2012-05-25 20:52:01 +00:00
.RB [ \-r ]
2013-10-20 08:56:49 +00:00
.RB [ ugoa ]*[ +-= ][ rwxst ]*
2011-05-27 22:48:07 +00:00
.RI [ file ...]
.SH DESCRIPTION
.B chmod
2011-06-10 23:30:07 +00:00
changes the file mode for the given files.
2011-05-27 22:48:07 +00:00
.P
2011-06-10 23:30:07 +00:00
If the mode is an
.I octal
number, the modes are set according to that number's comprising bits. The first
2013-10-20 08:56:49 +00:00
digit defines the setuid (4), setgid (2), and sticky (1) attributes. The second digit
2011-06-10 23:30:07 +00:00
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.
2013-10-20 08:56:49 +00:00
.TP
.B t
sticky attribute.
2011-06-10 23:30:07 +00:00
.PD
2011-05-27 22:48:07 +00:00
.SH OPTIONS
.TP
2012-05-25 20:52:01 +00:00
.B \-r
2011-05-27 22:48:07 +00:00
change directory mode recursively.
.SH SEE ALSO
.IR chmod (2)