2015-03-27 16:22:48 +00:00
|
|
|
.Dd March 27, 2015
|
2015-01-31 13:20:02 +00:00
|
|
|
.Dt CHMOD 1
|
2015-01-31 19:37:03 +00:00
|
|
|
.Os sbase
|
2015-01-17 21:33:19 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm chmod
|
2015-03-05 18:08:28 +00:00
|
|
|
.Nd change file modes
|
2015-01-17 21:33:19 +00:00
|
|
|
.Sh SYNOPSIS
|
2015-01-30 20:17:58 +00:00
|
|
|
.Nm
|
2015-02-16 16:47:07 +00:00
|
|
|
.Oo
|
|
|
|
.Fl R
|
|
|
|
.Op Fl H | L | P
|
|
|
|
.Oc
|
2015-01-17 21:33:19 +00:00
|
|
|
.Ar mode
|
2015-02-16 16:47:07 +00:00
|
|
|
.Ar file ...
|
2015-01-17 21:33:19 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2015-03-05 18:08:28 +00:00
|
|
|
changes the file mode of each
|
|
|
|
.Ar file
|
|
|
|
to
|
|
|
|
.Ar mode .
|
2015-01-17 21:33:19 +00:00
|
|
|
.Pp
|
|
|
|
If
|
|
|
|
.Ar mode
|
|
|
|
is
|
|
|
|
.Em octal
|
|
|
|
"[sog]e"
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It s
|
|
|
|
.Xr sticky 1 => s += 1
|
|
|
|
.Pp
|
|
|
|
.Xr setgid 2 => s += 2
|
|
|
|
.Pp
|
|
|
|
.Xr setuid 4 => s += 4
|
|
|
|
.It o|g|e
|
|
|
|
owner | group | everyone
|
|
|
|
.Pp
|
|
|
|
.Xr execute 1 => o|g|e += 1
|
|
|
|
.Pp
|
|
|
|
.Xr write 2 => o|g|e += 2
|
|
|
|
.Pp
|
|
|
|
.Xr read 4 => o|g|e += 4
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Leading zeroes may be omitted.
|
|
|
|
.Pp
|
|
|
|
If
|
|
|
|
.Ar mode
|
|
|
|
is
|
|
|
|
.Em symbolic
|
|
|
|
"[ugoa]*[+-=][rwxst]*"
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It u|g|o|a
|
|
|
|
owner | group | other (non-group) | everyone
|
|
|
|
.It +|-|=
|
|
|
|
add | remove | set
|
|
|
|
.It r|w|x|s|t
|
|
|
|
read | write | execute | setuid and setgid | sticky
|
|
|
|
.El
|
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl R
|
2015-02-16 16:47:07 +00:00
|
|
|
Change modes recursively.
|
|
|
|
.It Fl H
|
2015-03-05 18:08:28 +00:00
|
|
|
Dereference
|
|
|
|
.Ar file
|
|
|
|
if it is a symbolic link.
|
2015-02-16 16:47:07 +00:00
|
|
|
.It Fl L
|
2015-03-05 18:08:28 +00:00
|
|
|
Dereference all symbolic links.
|
2015-02-16 16:47:07 +00:00
|
|
|
.It Fl P
|
2015-03-05 18:08:28 +00:00
|
|
|
Preserve symbolic links. This is the default.
|
2015-01-17 21:33:19 +00:00
|
|
|
.El
|
2015-01-28 20:15:55 +00:00
|
|
|
.Sh SEE ALSO
|
2015-02-16 16:47:07 +00:00
|
|
|
.Xr chgrp 1 ,
|
2015-01-28 20:15:55 +00:00
|
|
|
.Xr umask 1
|
2015-01-17 21:33:19 +00:00
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
2015-03-27 16:22:48 +00:00
|
|
|
.St -p1003.1-2013
|
2015-01-17 21:33:19 +00:00
|
|
|
specification.
|
|
|
|
.Pp
|
|
|
|
The
|
2015-02-16 16:47:07 +00:00
|
|
|
.Op Fl HLP
|
|
|
|
flags are an extension to that specification.
|