diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:41:07 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:41:07 +0000 |
commit | 3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch) | |
tree | 3ee7a3ec64525911fa865bb984c86d997d855527 /man2/chmod.2 | |
parent | Adding debian version 6.05.01-1. (diff) | |
download | manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip |
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man2/chmod.2')
-rw-r--r-- | man2/chmod.2 | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/man2/chmod.2 b/man2/chmod.2 index b1c130e..d7b9694 100644 --- a/man2/chmod.2 +++ b/man2/chmod.2 @@ -9,7 +9,7 @@ .\" <michael@cantor.informatik.rwth-aachen.de>: NFS details .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com> .\" -.TH chmod 2 2023-03-30 "Linux man-pages 6.05.01" +.TH chmod 2 2023-10-31 "Linux man-pages 6.7" .SH NAME chmod, fchmod, fchmodat \- change permissions of a file .SH LIBRARY @@ -18,22 +18,22 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/stat.h> -.PP +.P .BI "int chmod(const char *" pathname ", mode_t " mode ); .BI "int fchmod(int " fd ", mode_t " mode ); -.PP +.P .BR "#include <fcntl.h>" " /* Definition of AT_* constants */" .B #include <sys/stat.h> -.PP +.P .BI "int fchmodat(int " dirfd ", const char *" pathname ", mode_t " \ mode ", int " flags ); .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .nf .BR fchmod (): Since glibc 2.24: @@ -50,7 +50,7 @@ Feature Test Macro Requirements for glibc (see _BSD_SOURCE || _XOPEN_SOURCE >= 500 .\" || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) .fi -.PP +.P .BR fchmodat (): .nf Since glibc 2.10: @@ -76,7 +76,7 @@ which is dereferenced if it is a symbolic link. .BR fchmod () changes the mode of the file referred to by the open file descriptor .IR fd . -.PP +.P The new file mode is specified in .IR mode , which is a bit mask created by ORing together zero or @@ -127,12 +127,12 @@ write by others .TP .BR S_IXOTH " (00001)" execute/search by others -.PP +.P The effective UID of the calling process must match the owner of the file, or the process must be privileged (Linux: it must have the .B CAP_FOWNER capability). -.PP +.P If the calling process is not privileged (Linux: does not have the .B CAP_FSETID capability), and the group of the file does not match @@ -141,7 +141,7 @@ supplementary group IDs, the .B S_ISGID bit will be turned off, but this will not cause an error to be returned. -.PP +.P As a security measure, depending on the filesystem, the set-user-ID and set-group-ID execution bits may be turned off if a file is written. @@ -153,7 +153,7 @@ which may have a special meaning. For the sticky bit, and for set-user-ID and set-group-ID bits on directories, see .BR inode (7). -.PP +.P On NFS filesystems, restricting the permissions will immediately influence already open files, because the access control is done on the server, but open files are maintained by the client. @@ -167,7 +167,7 @@ The system call operates in exactly the same way as .BR chmod (), except for the differences described here. -.PP +.P If the pathname given in .I pathname is relative, then it is interpreted relative to the directory @@ -177,7 +177,7 @@ referred to by the file descriptor the calling process, as is done by .BR chmod () for a relative pathname). -.PP +.P If .I pathname is relative and @@ -189,13 +189,13 @@ then is interpreted relative to the current working directory of the calling process (like .BR chmod ()). -.PP +.P If .I pathname is absolute, then .I dirfd is ignored. -.PP +.P .I flags can either be 0, or include the following flag: .TP @@ -205,7 +205,7 @@ If is a symbolic link, do not dereference it: instead operate on the link itself. This flag is not currently implemented. -.PP +.P See .BR openat (2) for an explanation of the need for @@ -218,7 +218,7 @@ is set to indicate the error. .SH ERRORS Depending on the filesystem, errors other than those listed below can be returned. -.PP +.P The more general errors for .BR chmod () are listed below: |