#include <sys/stat.h> int chmod(const char *path, mode_t mode);
This function changes the mode (writable or write-only) of the specified file. The value of mode can be a combination of one or more of the following:
S_IRUSR
S_IWUSR
Other S_I*
values could be included, but they will be ignored.
Zero if the file exists and the mode was changed, else nonzero.
not ANSI, POSIX
chmod("/tmp/dj.dat", S_IWUSR|S_IRUSR);
Go to the first, previous, next, last section, table of contents.