RTEMS Logo

RTEMS 4.6.0 On-Line Library


Configuration Space Manager cfg_chmod - Changes file mode.

PREV UP NEXT Bookshelf New Chapters

3.4.15: cfg_chmod - Changes file mode.

CALLING SEQUENCE:

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

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

STATUS CODES:

A successful call to cfg_chmod() returns a value of zero and an unsuccessful call returns the errno.

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 node and the calling process does not have the appropriate privileges, cfg_chmod() returns -1 and sets errno to EPERM.

NOTES:


PREV UP NEXT Bookshelf New Chapters

Copyright © 1988-2004 OAR Corporation