1RFIO_CHMOD(3)                    Rfio      Library      Functions
2RFIO_CHMOD(3)
3
4
5
6[1mNAME[0m
7       rfio_chmod, rfio_fchmod ‐ change access mode of a directo‐
8ry/file
9
10[1mSYNOPSIS[0m
11       [1m#include <sys/types.h>[0m
12       [1m#include "rfio_api.h"[0m
13
14       [1mint  rfio_chmod (const char *[4m[22mpath[24m[1m, mode_t
15[4m[22mmode[24m[1m);[0m
16       [1mint   rfio_fchmod    (int    [4m[22ms[24m[1m,    mode_t
17[4m[22mmode[24m[1m);[0m
18
19[1mDESCRIPTION[0m
20       [1mrfio_chmod   [22msets  the access permission portion of
21the mode of a direc‐
22       tory/file to the bit pattern in [4mmode.[0m
23
24       [1mrfio_fchmod [22mis identical to  [1mrfio_chmod  [22mbut
25works on the file descriptor
26       [4ms[24m returned by [1mrfio_open[22m.
27
28       [4mpath[24m    specifies  the logical pathname relative to
29the current directory
30              or the full pathname.
31
32       [4mmode[24m   is constructed by OR’ing the bits defined in
33<[1msys/stat.h[22m>  under
34              Unix or  [1m"statbits.h" [22munder Windows/NT:
35
36              [1mS_IRUSR   0000400         [22mread by owner
37              [1mS_IWUSR   0000200         [22mwrite by owner
38              [1mS_IXUSR    0000100         [22mexecute/search by
39owner
40              [1mS_IRGRP   0000040         [22mread by group
41              [1mS_IWGRP   0000020         [22mwrite by group
42              [1mS_IXGRP   0000010         [22mexecute/search  by
43group
44              [1mS_IROTH   0000004         [22mread by others
45              [1mS_IWOTH   0000002         [22mwrite by others
46              [1mS_IXOTH    0000001         [22mexecute/search by
47others
48
49       The  effective  user ID of the process must match the own‐
50er of the file
51       or be super‐user.  If a directory is writable and has  the
52sticky  bit
53       set,  files/directories within that directory can  be  re‐
54moved or renamed
55       only if:
56
57              the  effective user ID of the requestor matches the
58owner  ID  of
59              the file or
60
61              the  effective  user ID of  the  requestor  matches
62the owner ID of
63              the directory or
64
65              the file is writable by the requestor or
66
67              the requestor is super‐user.
68
69[1mRETURN VALUE[0m
70       This routine returns 0 if the operation was successful  or
71‐1  if  the
72       operation failed. In the latter case, [1mserrno [22mis set
73appropriately.
74
75[1mERRORS[0m
76       [1mEPERM         [22mThe  effective user ID does not match
77the owner of the file
78                    and is not super‐user.
79
80       [1mENOENT       [22mThe named file/directory does not  ex‐
81ist or is a null path‐
82                    name.
83
84       [1mEBADF         [4m[22ms[24m is not a valid file descrip‐
85tor.
86
87       [1mEACCES       [22mSearch  permission  is  denied   on  a
88component of the [4mpath[0m
89                    prefix or write permission on the file itself
90is denied.
91
92       [1mEFAULT       [4m[22mpath[24m is a NULL pointer.
93
94       [1mENOTDIR      [22mA component of [4mpath[24m  prefix  is
95not a directory.
96
97       [1mENAMETOOLONG  [22mThe  length  of  [4mpath[24m  exceeds
98[1mCA_MAXPATHLEN [22mor the length  of
99                    a [4mpath[24m  component  exceeds  [1mCA_MAX‐
100NAMELEN[22m.
101
102       [1mSENOSHOST    [22mHost unknown.
103
104       [1mSENOSSERV    [22mService unknown.
105
106       [1mSECOMERR     [22mCommunication error.
107
108[1mSEE ALSO[0m
109       [1mCastor_limits(4)[0m
110
111[1mAUTHOR[0m
112       [1mLCG Grid Deployment [22mTeam
113
114
115
116LCG                         $Date:    2005/03/31    13:13:02    $
117RFIO_CHMOD(3)
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum