fchmod(2) DG/UX 5.4R3.00 fchmod(2)
NAME
fchmod - change mode of file
SYNOPSIS
#include <sys/stat.h>
int fchmod (fildes, mode)
int fildes;
int mode;
where:
fildes File descriptor
mode File's new mode
DESCRIPTION
Fildes is a valid, active descriptor referring to an open file of
type ordinary, directory, block special, or character special, or
symbolic link. The file must reside on a file system device mounted
read-write. Fchmod changes the file's mode (stmode) in a manner
semantically identical to the way chmod does.
ACCESS CONTROL
The effective user id of the calling process must be superuser or
match the user id of the file.
The process's effective user id must be superuser to set the sticky
bit. To set the set-group-id bit, the process's effective user id
must be superuser or its effective group id must match the file's
group id. Failure to meet the requirements for setting one of these
bits does not produce an error. Note that meeting the first access
requirement is sufficient to allow a process to set the set-user-id
bit.
RETURN VALUE
0 The file's mode was successfully changed.
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
EBADF Fildes is not a valid, active file descriptor.
EINVAL The file descriptor refers to a pipe or an object that is
not a file.
EPERM The process is denied permission to change the file's mode.
EROFS The named file resides on a file system device mounted
read-only.
SEE ALSO
chmod(1), chmod(2), chown(2), creat(2), fchown(2), fcntl(2),
Licensed material--property of copyright holder(s) 1
fchmod(2) DG/UX 5.4R3.00 fchmod(2)
fstat(2), mknod(2), mknod(2), open(2), read(2), stat(2), write(2).
Licensed material--property of copyright holder(s) 2