Fchmod
Section: Feb. 1, 1993
(2)
Updated: MiNT Programmer's Manual
Index
Return to Main Contents
NAME
Fchmod - set file access permissions
SYNOPSIS
#include <filesys.h>
LONG Fchmod( char *name, WORD mode );
DESCRIPTION
Fchmod
changes the file access permissions for the file named
name.
The new access permissions are given in the word
mode,
which may be constructed by or'ing together the following symbolic constants
(defined in filesys.h):
- S_IRUSR,
-
Read, write, and execute permission (respectively) for the owner of the file.
- S_IRGRP,
-
Read, write, and execute permission (respectively) for the file's group.
- S_IROTH,
-
Read, write, and execute permission for everybody else.
- S_ISUID
-
Set user id bit. When this file is executed, make the effective user id
of the resulting process be equal to the user id of the file, rather
than the real user id. Note that this can be very dangerous, and should
be used with care!
- S_ISGID
-
Set group id bit. When this file is executed, make the effective group id
of the resulting process be equal to the group id of the file, rather
than the real group id. Note that this can be very dangerous, and should
be used with care!
Note that not all file systems support all of these bits; bits not supported
by a file system will be ignored. The set user id
and set group id bits are meaningful only for regular files which have some
execute permissions.
Note also that "execute" permission for a directory means permission to
search the directory for a file name or name component.
RETURNS
0 on success
EACCDN if the calling process has an effective uid which differs from the
owner of the file and which is not 0.
EFILNF if the file is not found
EPTHNF if the path to the file is not found.
SEE ALSO
Fattrib(2),
Fxattr(2)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURNS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 08:57:55 GMT, February 14, 2025