chmod(3)

DESCRIPTION

Changes the permission bits of the filesystem entry at path.

SYNOPSIS

#include <sys/stat.h>

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

RETURN VALUE

  • Returns zero, or -1 and sets errno.

ERRORS

  • -EFAULT
    • Path is null or cannot be read.
  • -EINVAL
    • Path resolution fails.
  • -ENOENT
    • The path does not exist.

NOTES

The current permission model stores the low 07777 bits and does not claim multi-user authorization semantics.