The chmod function changes the permissions of file to those
specified by mode. It returns 0 upon success, or
-1 upon failure setting errno accordingly.
See the system specific documentation for the C library
function chmod for a discussion of the mode parameter.