Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>chmod</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
chmod
=====

Syntax
------

     #include <sys/stat.h>
     
     int chmod(const char *path, mode_t mode);

Description
-----------

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'
     Make the file readable

`S_IWUSR'
     Make the file writable

Other `S_I*' values could be included, but they will be ignored.

Return Value
------------

Zero if the file exists and the mode was changed, else nonzero.

Example
-------

     chmod("/tmp/dj.dat", S_IWUSR|S_IRUSR);


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson