RTEMS Logo

RTEMS 4.6.1 On-Line Library


Files and Directories Manager chmod - Changes file mode.

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

4.4.25: chmod - Changes file mode.

CALLING SEQUENCE:

#include <sys/types.h>
#include <sys/stat.h>

int chmod(
  const char *path,
  mode_t      mode
);

STATUS CODES:

EACCES
Search permission is denied for a directory in a file's path prefix
ENAMETOOLONG
Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in effect.
ENOENT
A file or directory does not exist.
ENOTDIR
A component of the specified pathname was not a directory when a directory was expected.
EPERM
Operation is not permitted. Process does not have the appropriate priviledges or permissions to perform the requested operations.
EROFS
Read-only file system.

DESCRIPTION:

Set the file permission bits, the set user ID bit, and the set group ID bit for the file named by path to mode. If the effective user ID does not match the owner of the file and the calling process does not have the appropriate privileges, chmod() returns -1 and sets errno to EPERM.

NOTES:

NONE


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2004 OAR Corporation