File:  [Research Unix] / researchv10dc / dist / man / v4 / man2 / chmod.2
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.th CHMOD II 8/5/73
.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
.it name
has its mode changed to
.it 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 by owner
 0070 read, write, execute by group
 0007 read, write, execute by others
.in -3
.s3
Only the owner of a file (or the super-user) may change the mode.
.sh "SEE ALSO"
chmod(I)
.sh DIAGNOSTIC
Error bit
(c-bit) set if
.it name
cannot be found or if current user
is neither the owner of the file nor the super-user.
From C, a \*-1 returned value indicates an
error, 0 indicates success.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.