Penguin
Annotated edit history of chmod(1) version 5, including all changes. View license author blame.
Rev Author # Line
1 perry 1 CHMOD
2 !!!CHMOD
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 STICKY FILES
7 STICKY DIRECTORIES
8 OPTIONS
9 AUTHOR
10 REPORTING BUGS
11 COPYRIGHT
12 SEE ALSO
13 ----
14 !!NAME
15
16
17 chmod - change file access permissions
18 !!SYNOPSIS
19
20
21 __chmod__ [[''OPTION'']... ''MODE''[['',MODE'']...
22 ''FILE''...__
23 chmod__ [[''OPTION'']... ''OCTAL-MODE
24 FILE''...__
25 chmod__ [[''OPTION'']... ''--reference=RFILE
26 FILE''...
27 !!DESCRIPTION
28
29
30 This manual page documents the GNU version of __chmod__.
31 __chmod__ changes the permissions of each given file
32 according to ''mode'', which can be either a symbolic
33 representation of changes to make, or an octal number
34 representing the bit pattern for the new
35 permissions.
36
37
38 The format of a symbolic mode is
39 `[[ugoa...][[[[+-=][[rwxXstugo...]...][[,...]'. Multiple symbolic
40 operations can be given, separated by commas.
41
42
43 A combination of the letters `ugoa' controls which users'
44 access to the file will be changed: the user who owns it
45 (u), other users in the file's group (g), other users not in
46 the file's group (o), or all users (a). If none of these are
47 given, the effect is as if `a' were given, but bits that are
48 set in the umask are not affected.
49
50
51 The operator `+' causes the permissions selected to be added
52 to the existing permissions of each file; `-' causes them to
53 be removed; and `=' causes them to be the only permissions
54 that the file has.
55
56
57 The letters `rwxXstugo' select the new permissions for the
58 affected users: read (r), write (w), execute (or access for
59 directories) (x), execute only if the file is a directory or
60 already has execute permission for some user (X), set user
61 or group ID on execution (s), sticky (t), the permissions
62 that the user who owns the file currently has for it (u),
63 the permissions that other users in the file's group have
64 for it (g), and the permissions that other users not in the
65 file's group have for it (o).
66
67
68 A numeric mode is from one to four octal digits (0-7),
69 derived by adding up the bits with values 4, 2, and 1. Any
70 omitted digits are assumed to be leading zeros. The first
71 digit selects the set user ID (4) and set group ID (2) and
72 sticky (1) attributes. The second digit selects permissions
73 for the user who owns the file: read (4), write (2), and
74 execute (1); the third selects permissions for other users
75 in the file's group, with the same values; and the fourth
76 for other users not in the file's group, with the same
77 values.
78
79
80 __chmod__ never changes the permissions of symbolic
81 links; the __chmod__ system call cannot change their
82 permissions. This is not a problem since the permissions of
83 symbolic links are never used. However, for each symbolic
84 link listed on the command line, __chmod__ changes the
85 permissions of the pointed-to file. In contrast,
86 __chmod__ ignores symbolic links encountered during
87 recursive directory traversals.
88 !!STICKY FILES
89
90
91 On older Unix systems, the sticky bit caused executable
92 files to be hoarded in swap space. This feature is not
93 useful on modern VM systems, and the Linux kernel ignores
94 the sticky bit on files. Other kernels may use the sticky
95 bit on files for system-defined purposes. On some systems,
96 only the superuser can set the sticky bit on
97 files.
98 !!STICKY DIRECTORIES
99
100
101 When the sticky bit is set on a directory, files in that
102 directory may only be unlinked or renamed by root or their
103 owner. (Without the sticky bit, anyone able to write to the
104 directory can delete or rename files.) The sticky bit is
105 commonly found on directories, such as /tmp, which are
106 world-writable.
3 BenStaz 107
1 perry 108 !!OPTIONS
109
110
111 Change the mode of each FILE to MODE.
112
113
114 __-c__, __--changes__
115
116
117 like verbose but report only when a change is
118 made
119
120
121 __-f__, __--silent__, __--quiet__
122
123
124 suppress most error messages
125
126
127 __-v__, __--verbose__
128
129
130 output a diagnostic for every file processed
131
132
133 __--reference__=''RFILE''
134
135
136 use RFILE's mode instead of MODE values
137
138
139 __-R__, __--recursive__
140
141
142 change files and directories recursively
143
144
145 __--help__
146
147
148 display this help and exit
149
150
151 __--version__
152
153
154 output version information and exit
155
156
157 Each MODE is one or more of the letters ugoa, one of the
158 symbols +-= and one or more of the letters
159 rwxXstugo.
160 !!AUTHOR
161
162
2 perry 163 Written by David !MacKenzie.
1 perry 164 !!REPORTING BUGS
165
166
167 Report bugs to
168 !!COPYRIGHT
169
170
171 Copyright 2001 Free Software Foundation, Inc.
172 This is free software; see the source for copying
173 conditions. There is NO warranty; not even for
174 MERCHANTABILITY or FITNESS FOR A PARTICULAR
175 PURPOSE.
176 !!SEE ALSO
177
178
179 The full documentation for __chmod__ is maintained as a
180 Texinfo manual. If the __info__ and __chmod__ programs
181 are properly installed at your site, the
182 command
183
184
185 __info chmod__
186
187
188 should give you access to the complete manual.
189 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach()