Research V4 development
[unix-history] / man / man2 / chmod.2
CommitLineData
88d0a458
KT
1.th CHMOD II 8/5/73
2.sh NAME
3chmod \*- change mode of file
4.sh SYNOPSIS
5(chmod = 15.)
6.br
7.ft B
8sys chmod; name; mode
9.s3
10chmod(name, mode)
11.br
12char *name;
13.ft R
14.sh DESCRIPTION
15The file whose name
16is given as the null-terminated string pointed to by
17.it name
18has its mode changed to
19.it mode.
20Modes are constructed by ORing together some
21combination of the following:
22.s3
23.in +3
24 4000 set user ID on execution
25 2000 set group ID on execution
26 0400 read by owner
27 0200 write by owner
28 0100 execute by owner
29 0070 read, write, execute by group
30 0007 read, write, execute by others
31.in -3
32.s3
33Only the owner of a file (or the super-user) may change the mode.
34.sh "SEE ALSO"
35chmod(I)
36.sh DIAGNOSTIC
37Error bit
38(c-bit) set if
39.it name
40cannot be found or if current user
41is neither the owner of the file nor the super-user.
42From C, a \*-1 returned value indicates an
43error, 0 indicates success.