fchown(2) DG/UX 4.30 fchown(2)
NAME
fchown - Change user id and group id of a file.
SYNOPSIS
int fchown (fildes, user, group)
int fildes;
int user;
int group;
PARAMETERS
fildes Descriptor of the file.
user File's new user id.
group File's new group id.
DESCRIPTION
<Fildes> is a valid, active descriptor referring to an open
file of type ordinary, directory, block special, block
character, or symbolic link. The file must reside on a file
system device mounted read-write. Fchown changes the file's
user id (st_uid) and group id (st_gid) to the values
contained in <user> and <group>, respectively.
The semantics of changing the user and group ids are the
same as those described in chown.
ACCESS CONTROL
The effective user id of the calling process must be
superuser or match the file's user id.
RETURN VALUE
0 The user id and group id of the file were
successfully changed.
-1 An error occurred. Errno is set to indicate
the error.
EXCEPTIONS
Errno may be set to one of the following error codes:
EBADF The descriptor does not refer to an open
file.
EINVAL The descriptor refers to a pipe or an object
that is not a file.
Licensed material--property of copyright holder(s) Page 1
fchown(2) DG/UX 4.30 fchown(2)
EPERM Permission to change the file's user and
group ids is denied.
EROFS The named file resides on a file system
device mounted read-only.
SEE ALSO
The related manual sections: chmod(1),
chmod(2), chown(2), fchmod(2).
Licensed material--property of copyright holder(s) Page 2