gfs_chmod - change permissions of a file
char *gfs_chmod (char * gfarm_url, mode_t mode);
gfs_chmod() changes the mode of the file given by gfarm_url.
Permission bit masks of mode are similar to ones of mode parameter to
chmod(2), though only the least 9 bit are effective.
An executable file cannot be changed to a non-executable file and vice
versa, unless the number of fragment of the file is only one. In
detail, a file has multiple fragments with any execution bit should not
be changed to that with no execution bit. It is necessary to have at
least one execution bit. Similarly, a file has multiple fragments with
no execution bit should not be changed to that with any execution bit.
NULL The function terminated successfully.
Insufficient memory was available.
User authentication failed when connecting to gfmd(8) or
The parent directory of gfarm_url did not allow write
The effective UID does not match the owner of the file, and is
not zero. Or an attempt was made to change an executable file
with more than one fragment to a non-executable file, or vice
The file does not exist.
A component of the path prefix is not a directory.
Others An error except the above occurred. The reason is shown by its