rfio_chmod man page

RFIO_CHMOD(3)               Rfio Library Functions               RFIO_CHMOD(3)

      rfio_chmod, rfio_fchmod - change access mode of a directory/file

      [1m#include <sys/types.h>[0m
      [1m#include "rfio_api.h"[0m

      [1mint rfio_chmod (const char *[4m[22mpath[24m[1m, mode_t [4m[22mmode[24m[1m);[0m
      [1mint rfio_fchmod (int [4m[22ms[24m[1m, mode_t [4m[22mmode[24m[1m);[0m

      [1mrfio_chmod  [22msets  the access permission portion of the mode of a direc-
      tory/file to the bit pattern in [4mmode.[0m

      [1mrfio_fchmod [22mis identical to [1mrfio_chmod [22mbut works on the file descriptor
      [4ms[24m returned by [1mrfio_open[22m.

      [4mpath[24m   specifies the logical pathname relative to the current directory
             or the full pathname.

      [4mmode[24m   is constructed by OR'ing the bits defined in <[1msys/stat.h[22m>  under
             Unix or  [1m"statbits.h" [22munder Windows/NT:

             [1mS_IRUSR   0000400         [22mread by owner
             [1mS_IWUSR   0000200         [22mwrite by owner
             [1mS_IXUSR   0000100         [22mexecute/search by owner
             [1mS_IRGRP   0000040         [22mread by group
             [1mS_IWGRP   0000020         [22mwrite by group
             [1mS_IXGRP   0000010         [22mexecute/search by group
             [1mS_IROTH   0000004         [22mread by others
             [1mS_IWOTH   0000002         [22mwrite by others
             [1mS_IXOTH   0000001         [22mexecute/search by others

      The  effective  user ID of the process must match the owner of the file
      or be super-user.  If a directory is writable and has  the  sticky  bit
      set,  files/directories within that directory can be removed or renamed
      only if:

             the effective user ID of the requestor matches the owner  ID  of
             the file or

             the  effective  user ID of the requestor matches the owner ID of
             the directory or

             the file is writable by the requestor or

             the requestor is super-user.

      This routine returns 0 if the operation was successful  or  -1  if  the
      operation failed. In the latter case, [1mserrno [22mis set appropriately.

      [1mEPERM        [22mThe effective user ID does not match the owner of the file
                   and is not super-user.

      [1mENOENT       [22mThe named file/directory does not exist or is a null path-

      [1mEBADF        [4m[22ms[24m is not a valid file descriptor.

      [1mEACCES       [22mSearch  permission  is  denied  on a component of the [4mpath[0m
                   prefix or write permission on the file itself is denied.

      [1mEFAULT       [4m[22mpath[24m is a NULL pointer.

      [1mENOTDIR      [22mA component of [4mpath[24m prefix is not a directory.

      [1mENAMETOOLONG [22mThe length of [4mpath[24m exceeds [1mCA_MAXPATHLEN [22mor the length  of
                   a [4mpath[24m component exceeds [1mCA_MAXNAMELEN[22m.

      [1mSENOSHOST    [22mHost unknown.

      [1mSENOSSERV    [22mService unknown.

      [1mSECOMERR     [22mCommunication error.

[1mSEE ALSO[0m

      [1mLCG Grid Deployment [22mTeam

LCG                      $Date: 2005/03/31 13:13:02 $            RFIO_CHMOD(3)

Referenced By


rfio_fchmod(3) is an alias of rfio_chmod(3).