int rfio_chmod (const char *path, mode_t mode); int rfio_fchmod (int s, mode_t mode);
sets the access permission portion of the mode of a directory/file to the bit pattern in
is identical to
but works on the file descriptor
specifies the logical pathname relative to the current directory or
the full pathname.
is constructed by OR'ing the bits defined in
under Unix or "statbits.h" under Windows/NT:
read by owner
write by owner
execute/search by owner
read by group
write by group
execute/search by group
read by others
write by others
execute/search by others
The effective user ID of the process must match the owner of the file or be
If a directory is writable and has the sticky bit set, files/directories within
that directory can be removed or renamed only if:
the effective user ID of the requestor matches the owner ID of the file or
the effective user ID of the requestor matches the owner ID of the directory or
the file is writable by the requestor or
the requestor is super-user.
This routine returns 0 if the operation was successful or -1 if the operation
failed. In the latter case,
is set appropriately.
The effective user ID does not match the owner of the file and is not super-user.
The named file/directory does not exist or is a null pathname.
is not a valid file descriptor.
Search permission is denied on a component of the
prefix or write permission on the file itself is denied.
is a NULL pointer.
A component of
prefix is not a directory.
The length of
or the length of a