File: gfs_chmod.3.html

package info (click to toggle)
gfarm 2.7.20%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 24,880 kB
  • sloc: ansic: 188,235; sh: 43,469; cpp: 9,442; java: 6,866; makefile: 3,519; perl: 2,412; python: 1,449; ruby: 965; php: 807; sql: 173; xml: 51; csh: 2
file content (214 lines) | stat: -rw-r--r-- 3,243 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>gfs_chmod</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><H1
><A
NAME="GFS-CHMOD.3"
></A
>gfs_chmod</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="NAME"
></A
><H2
>Name</H2
>gfs_chmod&nbsp;--&nbsp;change permissions of a file</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="SYNOPSIS"
></A
><H2
>Synopsis</H2
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN12"
></A
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="FUNCSYNOPSISINFO"
>#include &#60;gfarm/gfarm.h&#62;</PRE
></TD
></TR
></TABLE
><P
><CODE
><CODE
CLASS="FUNCDEF"
><TT
CLASS="FUNCTION"
><SPAN
CLASS="RETURNVALUE"
>char *</SPAN
>gfs_chmod</TT
></CODE
>(char * <TT
CLASS="PARAMETER"
><I
>gfarm_url</I
></TT
>, mode_t <TT
CLASS="PARAMETER"
><I
>mode</I
></TT
>);</CODE
></P
><P
></P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="DESCRIPTION"
></A
><H2
>DESCRIPTION</H2
><P
><TT
CLASS="FUNCTION"
>gfs_chmod()</TT
> changes the mode of the file
given by <TT
CLASS="PARAMETER"
><I
>gfarm_url</I
></TT
>.  Permission bit masks of
<TT
CLASS="PARAMETER"
><I
>mode</I
></TT
> are similar to ones of mode parameter to
<TT
CLASS="FUNCTION"
>chmod(2)</TT
>, though only the least 9 bit are
effective.</P
><P
>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.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="RETURN-VALUES"
></A
><H2
>RETURN VALUES</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><CODE
CLASS="CONSTANT"
>NULL</CODE
></DT
><DD
><P
>The function terminated successfully.</P
></DD
><DT
><CODE
CLASS="CONSTANT"
>GFARM_ERR_NO_MEMORY</CODE
></DT
><DD
><P
>Insufficient memory was available.</P
></DD
><DT
><CODE
CLASS="CONSTANT"
>GFARM_ERR_AUTHENTICATION</CODE
></DT
><DD
><P
>User authentication failed when connecting to gfmd(8) or gfsd(8).</P
></DD
><DT
><CODE
CLASS="CONSTANT"
>GFARM_ERR_PERMISSION_DENIED</CODE
></DT
><DD
><P
>The parent directory of <TT
CLASS="PARAMETER"
><I
>gfarm_url</I
></TT
>
did not allow write permission.</P
></DD
><DT
><CODE
CLASS="CONSTANT"
>GFARM_ERR_OPERATION_NOT_PERMITTED</CODE
></DT
><DD
><P
>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 versa.</P
></DD
><DT
><CODE
CLASS="CONSTANT"
>GFARM_ERR_NO_SUCH_OBJECT</CODE
></DT
><DD
><P
>The file does not exist.</P
></DD
><DT
><CODE
CLASS="CONSTANT"
>GFARM_ERR_NOT_A_DIRECTORY</CODE
></DT
><DD
><P
>A component of the path prefix is not a directory.</P
></DD
><DT
>Others</DT
><DD
><P
>An error except the above occurred.  The reason is shown by its
pointed strings.</P
></DD
></DL
></DIV
></DIV
></BODY
></HTML
>