1LFC_CREATG(3)                     LFC      Library      Functions
2LFC_CREATG(3)
3
4
5
6[1mNAME[0m
7       lfc_creatg  ‐ create a new LFC  file  with  the  specified
8GUID or reset it
9       in the name server
10
11[1mSYNOPSIS[0m
12       [1m#include <sys/types.h>[0m
13       [1m#include "lfc_api.h"[0m
14
15       [1mint  lfc_creatg (const char *[4m[22mpath[24m[1m,  const
16char *[4m[22mguid[24m[1m, mode_t [4m[22mmode[24m[1m)[0m
17
18[1mDESCRIPTION[0m
19       [1mlfc_creatg [22mcreates a new LFC file with  the  speci‐
20fied GUID or resets  it
21       in the name server.
22
23       If  the  file exists, the length is truncated to 0 and the
24mode and owner
25       are unchanged.
26
27       If the file does not exist yet, an entry is created in the
28name  server
29       database  and  the file’s owner ID is set to the effective
30user ID of the
31       requestor.  The group ID of the file is set to the  effec‐
32tive  group  ID
33       of   the  requestor  or is taken from the parent directory
34if the latter
35       has the [1mS_ISGID [22mbit set.
36
37       The access permission bits for the  file  are  taken  from
38[4mmode[24m,  then  all
39       bits  set  in  the requestor’s file mode creation mask are
40cleared (see
41       [1mlfc_umask[22m(3)).
42
43       [4mguid[24m   specifies the Grid Unique IDentifier.
44
45       [4mpath[24m   specifies the  logical   pathname   relative
46to  the  current  LFC
47              directory or the full LFC pathname.
48
49[1mRETURN VALUE[0m
50       This  routine  returns  0  if the operation was successful
51or ‐1 if the
52       operation failed. In the latter case, [1mserrno [22mis set
53appropriately.
54
55[1mERRORS[0m
56       [1mENOENT       [22mA component of [4mpath[24m prefix does
57not exist  or  [4mpath[24m  is  a
58                    null pathname.
59
60       [1mEACCES       [22mSearch  permission  is  denied   on  a
61component of the [4mpath[0m
62                    prefix  or  the file does not exist and write
63permission  on
64                    the  parent  directory  is   denied   or  the
65file exists and
66                    write  permission  on  the file itself is de‐
67nied.
68
69       [1mEFAULT       [4m[22mpath[24m is a NULL pointer.
70
71       [1mEEXIST       [22mFile exists already with  a  different
72GUID or has replicas.
73
74       [1mENOTDIR       [22mA  component of [4mpath[24m prefix is
75not a directory.
76
77       [1mEISDIR       [4m[22mpath[24m is an existing directory.
78
79       [1mEINVAL       [22mThe fileclass in the  parent  directo‐
80ry  is  zero  or  the
81                    length    of    the    [4mguid[24m    exceeds
82[1mCA_MAXGUIDLEN.[0m
83
84       [1mENOSPC       [22mThe name server database is full.
85
86       [1mENAMETOOLONG [22mThe   length  of  [4mpath[24m  exceeds
87[1mCA_MAXPATHLEN [22mor the length of
88                    a  [4mpath[24m  component  exceeds [1mCA_MAX‐
89NAMELEN.[0m
90
91       [1mSENOSHOST    [22mHost unknown.
92
93       [1mSENOSSERV    [22mService unknown.
94
95       [1mSECOMERR     [22mCommunication error.
96
97       [1mENSNACT      [22mName server is not running or is being
98shutdown.
99
100[1mSEE ALSO[0m
101       [1mCastor_limits(4)[22m,              [1mlfc_chdir(3)[22m,
102[1mlfc_chmod(3)[22m,     [1mlfc_statg(3)[22m,
103       [1mlfc_umask(3)[0m
104
105[1mAUTHOR[0m
106       [1mLCG Grid Deployment [22mTeam
107
108
109
110LFC                                                        $Date$
111LFC_CREATG(3)
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum