summaryrefslogtreecommitdiff
path: root/sys/man/1/chmod
diff options
context:
space:
mode:
authorTaru Karttunen <taruti@taruti.net>2011-03-30 16:49:47 +0300
committerTaru Karttunen <taruti@taruti.net>2011-03-30 16:49:47 +0300
commitb41b9034225ab3e49980d9de55c141011b6383b0 (patch)
tree891014b4c2e803e01ac7a1fd2b60819fbc5a6e73 /sys/man/1/chmod
parentc558a99e0be506a9abdf677f0ca4490644e05fc1 (diff)
Import sources from 2011-03-30 iso image - sys/man
Diffstat (limited to 'sys/man/1/chmod')
-rwxr-xr-xsys/man/1/chmod106
1 files changed, 106 insertions, 0 deletions
diff --git a/sys/man/1/chmod b/sys/man/1/chmod
new file mode 100755
index 000000000..a5c80b677
--- /dev/null
+++ b/sys/man/1/chmod
@@ -0,0 +1,106 @@
+.TH CHMOD 1
+.SH NAME
+chmod \- change mode
+.SH SYNOPSIS
+.B chmod
+.I mode file ...
+.SH DESCRIPTION
+The mode of
+each named file
+is changed
+according to
+.IR mode,
+which may be an octal number or a symbolic change to the existing mode.
+A
+.I mode
+is an octal
+number constructed
+from the OR of the
+following modes.
+.TF 0000
+.TP
+0400
+read by owner
+.TP
+0200
+write by owner
+.TP
+0100
+execute (search in directory) by owner
+.TP
+0070
+read, write, execute (search) by group
+.TP
+0007
+read, write, execute (search) by others
+.PD
+.PP
+A symbolic
+.I mode
+has the form:
+.IP
+.RI [who]
+.I op permission
+.PP
+The
+.I who
+part is a combination
+of the letters
+.B u
+(for user's permissions),
+.B g
+(group)
+and
+.B o
+(other).
+The letter
+.B a
+stands for
+.BR ugo .
+If
+.I who
+is omitted,
+the default is
+.BR a .
+.PP
+.I Op
+can be
+.B +
+to add
+.I permission
+to the file's mode,
+.B -
+to take away
+.IR permission ,
+and
+.B =
+to assign
+.I permission
+absolutely
+(all other bits will
+be reset).
+.PP
+.I Permission
+is any combination of the letters
+.B r
+(read),
+.B w
+(write),
+.B x
+(execute),
+.B a
+(append only),
+.B l
+(exclusive access),
+and
+.B t
+(temporary file).
+.PP
+Only the owner of a file or the group leader of its group
+may change the file's mode.
+.SH SOURCE
+.B /sys/src/cmd/chmod.c
+.SH "SEE ALSO"
+.IR ls (1),
+.IR stat (2),
+.IR stat (5)