source: trunk/minix/man/man1/chmod.1@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.1 KB
Line 
1.TH CHMOD 1
2.SH NAME
3chmod \- change access mode for files
4.SH SYNOPSIS
5\fBchmod [\fB\-R\fR] \fImode \fIfile\fR ...\fR
6.br
7.de FL
8.TP
9\\fB\\$1\\fR
10\\$2
11..
12.de EX
13.TP 20
14\\fB\\$1\\fR
15# \\$2
16..
17.SH OPTIONS
18.FL "\-R" "Change hierarchies recursively"
19.SH EXAMPLES
20.EX "chmod 755 file" "Owner: rwx Group: r\-x Others: r\-x"
21.EX "chmod +x file1 file2" "Make \fIfile1\fR and \fIfile2\fR executable"
22.EX "chmod a\-w file" "Make \fIfile\fR read only"
23.EX "chmod u+s file" "Turn on SETUID for \fIfile\fR"
24.EX "chmod \-R o+w dir" "Allow writing for all files in dir"
25.SH DESCRIPTION
26.PP
27The given mode is applied to each file in the file list. If the \fB\-R\fR
28flag is present, the files in a directory will be changed as well.
29The mode can be either absolute or symbolic. Absolute modes are given as an
30octal number that represents the new file mode. The mode bits are defined as
31follows:
32.ta 0.25i
33.nf
34.PP
35 4000 Set effective user id on execution to file's owner id
36 2000 Set effective group id on execution to file's group id
37 0400 file is readable by the owner of the file
38 0200 writeable by owner
39 0100 executable by owner
40 0070 same as above, for other users in the same group
41 0007 same as above, for all other users
42.PP
43.fi
44Symbolic modes modify the current file mode in a specified way. The form is:
45.PP
46 [who] op permissions { op permissions ...} {, [who] op ... }
47.PP
48The possibilities for \fIwho\fR are \fIu\fR, \fIg\fR, \fIo\fR, and \fIa\fR,
49standing for user, group, other and all, respectively.
50If \fIwho\fR is omitted, \fIa\fR is assumed, but the current umask is used.
51The op can be \fI+\fR, \fI-\fR, or \fI=\fR; \fI+\fR turns on the
52given permissions, \fI\- \fRturns them off; \fI=\fR sets the permissions
53exclusively for the given \fIwho\fR.
54For example \fIg=x\fR sets the group permissions to \fI--x\fR.
55.PP
56The possible permissions are \fIr\fR, \fIw\fR, \fIx\fR; which stand for read,
57write, and execute; \fIs\fR turns on the set effective user/group id bits.
58\fIs\fR only makes sense with \fIu\fR and \fIg\fR;\fR o+s\fR is
59harmless.
60.SH "SEE ALSO"
61.BR ls (1),
62.BR chmod (2).
Note: See TracBrowser for help on using the repository browser.