|
|
1.1 root 1: .TH CHMOD 1
2: .SH NAME
3: chmod \- change mode
4: .SH SYNOPSIS
5: .B chmod
6: .I mode file ...
7: .SH DESCRIPTION
8: The mode of
9: each named file
10: is changed
11: according to
12: .IR mode,
13: which may be an octal number or a symbolic change to the existing mode.
14: A
15: .I mode
16: is an octal
17: number constructed
18: from the OR of the
19: following modes.
20: .TF 0000
21: .TP
22: 0400
23: read by owner
24: .TP
25: 0200
26: write by owner
27: .TP
28: 0100
29: execute (search in directory) by owner
30: .TP
31: 0070
32: read, write, execute (search) by group
33: .TP
34: 0007
35: read, write, execute (search) by others
36: .PD
37: .PP
38: A symbolic
39: .I mode
40: has the form:
41: .IP
42: .RI [who]
43: .I op permission
44: .PP
45: The
46: .I who
47: part is a combination
48: of the letters
49: .B u
50: (for user's permissions),
51: .B g
52: (group)
53: and
54: .B o
55: (other).
56: The letter
57: .B a
58: stands for
59: .BR ugo .
60: If
61: .I who
62: is omitted,
63: the default is
64: .BR a .
65: .PP
66: .I Op
67: can be
68: .B +
69: to add
70: .I permission
71: to the file's mode,
72: .B -
73: to take away
74: .IR permission ,
75: and
76: .B =
77: to assign
78: .I permission
79: absolutely
80: (all other bits will
81: be reset).
82: .PP
83: .I Permission
84: is any combination of the letters
85: .B r
86: (read),
87: .B w
88: (write),
89: .B x
90: (execute),
91: .B a
92: (append only),
93: and
94: .B l
95: (exclusive access).
96: .PP
97: Only the owner of a file or the group leader of its group
98: may change the file's mode.
99: .SH SOURCE
100: .B /sys/src/cmd/chmod.c
101: .SH "SEE ALSO"
102: .IR ls (1),
103: .IR stat (2),
104: .IR stat (5)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.