1LFC_CHMOD(3) LFC Library Functions
2LFC_CHMOD(3)
3
4
5
6[1mNAME[0m
7 lfc_chmod ‐ change access mode of a LFC directo‐
8ry/file in the name
9 server
10
11[1mSYNOPSIS[0m
12 [1m#include <sys/types.h>[0m
13 [1m#include "lfc_api.h"[0m
14
15 [1mint lfc_chmod (const char *[4m[22mpath[24m[1m, mode_t
16[4m[22mmode[24m[1m)[0m
17
18[1mDESCRIPTION[0m
19 [1mlfc_chmod [22msets the access permission portion of
20the mode of a LFC
21 directory/file in the name server to the bit pattern in
22[4mmode.[0m
23
24 [4mpath[24m specifies the logical pathname relative
25to the current LFC
26 directory or the full LFC pathname.
27
28 [4mmode[24m is constructed by OR’ing the bits defined in
29<[1msys/stat.h[22m> under
30 Unix or [1m"statbits.h" [22munder Windows/NT:
31
32 [1mS_ISUID 0004000 [22mset user ID on ex‐
33ecution
34 [1mS_ISGID 0002000 [22mset group ID on
35execution
36 [1mS_ISVTX 0001000 [22msticky bit
37 [1mS_IRUSR 0000400 [22mread by owner
38 [1mS_IWUSR 0000200 [22mwrite by owner
39 [1mS_IXUSR 0000100 [22mexecute/search by
40owner
41 [1mS_IRGRP 0000040 [22mread by group
42 [1mS_IWGRP 0000020 [22mwrite by group
43 [1mS_IXGRP 0000010 [22mexecute/search by
44group
45 [1mS_IROTH 0000004 [22mread by others
46 [1mS_IWOTH 0000002 [22mwrite by others
47 [1mS_IXOTH 0000001 [22mexecute/search by
48others
49
50 The effective user ID of the process must match the own‐
51er of the file
52 or the caller must have ADMIN privilege in the Cupv
53database. If a
54 directory is writable and has the sticky bit set,
55files/directories
56 within that directory can be removed or renamed only if:
57
58 the effective user ID of the requestor matches the
59owner ID of
60 the file or
61
62 the effective user ID of the requestor matches
63the owner ID of
64 the directory or
65
66 the file is writable by the requestor or
67
68 the requestor has ADMIN privilege in the Cupv data‐
69base.
70
71[1mRETURN VALUE[0m
72 This routine returns 0 if the operation was successful or
73‐1 if the
74 operation failed. In the latter case, [1mserrno [22mis set
75appropriately.
76
77[1mERRORS[0m
78 [1mEPERM [22mThe effective user ID does not match
79the owner of the file
80 and the caller does not have ADMIN privilege
81in the Cupv
82 database.
83
84 [1mENOENT [22mThe named file/directory does not ex‐
85ist or is a null path‐
86 name.
87
88 [1mEACCES [22mSearch permission is denied on a com‐
89ponent of the [4mpath[0m
90 prefix.
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 [1mENSNACT [22mName server is not running or is being
109shutdown.
110
111[1mSEE ALSO[0m
112 [1mCastor_limits(4)[22m, [1mlfc_chdir(3)[22m,
113[1mCupvlist(1)[0m
114
115[1mAUTHOR[0m
116 [1mLCG Grid Deployment [22mTeam
117
118
119
120LFC $Date: 2002/10/16 06:25:40 $
121LFC_CHMOD(3)
122
123
124
125
126
127
128
129
130
131
132