223 .sp
224 The {\fBPRIV_FILE_OWNER\fR} privilege overrides constraints on ownership when
225 changing permissions on a file.
226 .sp
227 The {\fBPRIV_FILE_SETID\fR} privilege overrides constraints on ownership when
228 adding the setuid or setgid bits to an executable file or a directory. When
229 adding the setuid bit to a root owned executable, additional restrictions
230 apply. See \fBprivileges\fR(5).
231 .RE
232
233 .sp
234 .LP
235 The \fBchmod()\fR and \fBfchmodat()\fR functions will fail if:
236 .sp
237 .ne 2
238 .na
239 \fB\fBEACCES\fR\fR
240 .ad
241 .RS 16n
242 Search permission is denied on a component of the path prefix of \fIpath\fR and
243 for \fBfchmodat()\fR, \fBfiledes\fR was not opened with \fBO_SEARCH\fR requsted.
244 The privilege {\fBFILE_DAC_SEARCH\fR} overrides file permissions restrictions
245 in that case.
246 .RE
247
248 .sp
249 .ne 2
250 .na
251 \fB\fBEFAULT\fR\fR
252 .ad
253 .RS 16n
254 The \fIpath\fR argument points to an illegal address.
255 .RE
256
257 .sp
258 .ne 2
259 .na
260 \fB\fBELOOP\fR\fR
261 .ad
262 .RS 16n
263 A loop exists in symbolic links encountered during the resolution of the
|
223 .sp
224 The {\fBPRIV_FILE_OWNER\fR} privilege overrides constraints on ownership when
225 changing permissions on a file.
226 .sp
227 The {\fBPRIV_FILE_SETID\fR} privilege overrides constraints on ownership when
228 adding the setuid or setgid bits to an executable file or a directory. When
229 adding the setuid bit to a root owned executable, additional restrictions
230 apply. See \fBprivileges\fR(5).
231 .RE
232
233 .sp
234 .LP
235 The \fBchmod()\fR and \fBfchmodat()\fR functions will fail if:
236 .sp
237 .ne 2
238 .na
239 \fB\fBEACCES\fR\fR
240 .ad
241 .RS 16n
242 Search permission is denied on a component of the path prefix of \fIpath\fR and
243 for \fBfchmodat()\fR, \fBfiledes\fR was not opened with \fBO_SEARCH\fR requested.
244 The privilege {\fBFILE_DAC_SEARCH\fR} overrides file permissions restrictions
245 in that case.
246 .RE
247
248 .sp
249 .ne 2
250 .na
251 \fB\fBEFAULT\fR\fR
252 .ad
253 .RS 16n
254 The \fIpath\fR argument points to an illegal address.
255 .RE
256
257 .sp
258 .ne 2
259 .na
260 \fB\fBELOOP\fR\fR
261 .ad
262 .RS 16n
263 A loop exists in symbolic links encountered during the resolution of the
|