aboutsummaryrefslogtreecommitdiffstats
path: root/man2/chmod.2
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2021-08-18 03:02:55 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2021-08-18 03:47:26 +0200
commit90879cbd20f563af6bcc0ee9035cd59f591c29c7 (patch)
tree3a7e477c5362c6cc857c35673fa99a5185b898af /man2/chmod.2
parent97e2d8e602d44b1271f18cd3297a5e40bed3584c (diff)
downloadman-pages-90879cbd20f563af6bcc0ee9035cd59f591c29c7.tar.gz
chmod.2, chown.2, open.2, mkdir.2, mknod.2, readlink.2, stat.2, symlink.2, mkfifo.3, scandir.3, sem_wait.3: ERRORS: combine errors into a single alphabetic list
These pages split out extra errors for some APIs into a separate list. Probably, the pages are easier to ready if all errors are combined into a single list. Note that there still remain a few pages where the errors are listed separately for different APIs. For the moment, it seems best to leave those pages as is, since the error lists are largely distinct in those pages. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man2/chmod.2')
-rw-r--r--man2/chmod.283
1 files changed, 34 insertions, 49 deletions
diff --git a/man2/chmod.2 b/man2/chmod.2
index 6862a7e3d2..b1aa3691ce 100644
--- a/man2/chmod.2
+++ b/man2/chmod.2
@@ -245,10 +245,30 @@ Search permission is denied on a component of the path prefix.
(See also
.BR path_resolution (7).)
.TP
+.B EBADF
+.RB ( fchmod ())
+The file descriptor
+.I fd
+is not valid.
+.TP
+.B EBADF
+.RB ( fchmodat ())
+.I pathname
+is relative but
+.I dirfd
+is neither
+.B AT_FDCWD
+nor a valid file descriptor.
+.TP
.B EFAULT
.I pathname
points outside your accessible address space.
.TP
+.B EINVAL
+.RB ( fchmodat ())
+Invalid flag specified in
+.IR flags .
+.TP
.B EIO
An I/O error occurred.
.TP
@@ -269,6 +289,20 @@ Insufficient kernel memory was available.
.B ENOTDIR
A component of the path prefix is not a directory.
.TP
+.B ENOTDIR
+.RB ( fchmodat ())
+.I pathname
+is relative and
+.I dirfd
+is a file descriptor referring to a file other than a directory.
+.TP
+.B ENOTSUP
+.RB ( fchmodat ())
+.I flags
+specified
+.BR AT_SYMLINK_NOFOLLOW ,
+which is not supported.
+.TP
.B EPERM
The effective UID does not match the owner of the file,
and the process is not privileged (Linux: it does not have the
@@ -282,55 +316,6 @@ The file is marked immutable or append-only.
.TP
.B EROFS
The named file resides on a read-only filesystem.
-.PP
-The general errors for
-.BR fchmod ()
-are listed below:
-.TP
-.B EBADF
-The file descriptor
-.I fd
-is not valid.
-.TP
-.B EIO
-See above.
-.TP
-.B EPERM
-See above.
-.TP
-.B EROFS
-See above.
-.PP
-The same errors that occur for
-.BR chmod ()
-can also occur for
-.BR fchmodat ().
-The following additional errors can occur for
-.BR fchmodat ():
-.TP
-.B EBADF
-.I pathname
-is relative but
-.I dirfd
-is neither
-.B AT_FDCWD
-nor a valid file descriptor.
-.TP
-.B EINVAL
-Invalid flag specified in
-.IR flags .
-.TP
-.B ENOTDIR
-.I pathname
-is relative and
-.I dirfd
-is a file descriptor referring to a file other than a directory.
-.TP
-.B ENOTSUP
-.I flags
-specified
-.BR AT_SYMLINK_NOFOLLOW ,
-which is not supported.
.SH VERSIONS
.BR fchmodat ()
was added to Linux in kernel 2.6.16;