.th CHMOD IV 3/6/86
.sh NAME
chmod \*- change mode of file
.sh SYNOPSIS
(chmod = 15.)
.br
.ft B
sys chmod; name; mode
.s3
chmod(name, mode)
.br
char *name;
.ft R
.sh DESCRIPTION
The file whose name
is given as the null-terminated string pointed to by
name
has its mode changed to
mode.
Modes are constructed by ORing together some
combination of the following:
.s3
.in +3
 4000 set user ID on execution
 2000 set group ID on execution
 0400 read by owner
 0200 write by owner
 0100 execute (search on directory) by owner
 0070 read, write, execute (search) by group
 0007 read, write, execute (search) by others
.in -3
.s3
Only the owner of a file may change its mode.
.sh "SEE ALSO"
chmod (I)
.sh DIAGNOSTIC
Error bit
(c-bit) set if
name
cannot be found or if current user
is not the owner of the file.
From C, a \*-1 returned value indicates an
error, 0 indicates success.
.sh KSOS
Note that
uid
and
gid
do not work as in UNIX.
In particular,
from the Emulator it is not possible to change
the setting of the set user or set group ID bits.
