diff options
| author | Andreas Gruenbacher <andreas.gruenbacher@gmail.com> | 2015-04-13 19:38:52 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2015-04-21 14:37:09 +0200 |
| commit | 5d817eb475ecaabc65102440d6ebcc342d1a39aa (patch) | |
| tree | 07ba55c0cc2824714c988a9dfc198ea286ebc684 | |
| parent | ed948c28b326a3bbe8e5ca17781f96b96c07e127 (diff) | |
| download | man-pages-5d817eb475ecaabc65102440d6ebcc342d1a39aa.tar.gz | |
umask.2, open.2, mknod.2, mkdir.2: Explain what default ACLs do
Explain the effect that default ACLs have (instead of the umask)
in umask.2. Mention that default ACLs can have an affect in
open.2, mknod.2, and mkdir.2.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man2/mkdir.2 | 5 | ||||
| -rw-r--r-- | man2/mknod.2 | 5 | ||||
| -rw-r--r-- | man2/open.2 | 3 | ||||
| -rw-r--r-- | man2/umask.2 | 11 |
4 files changed, 18 insertions, 6 deletions
diff --git a/man2/mkdir.2 b/man2/mkdir.2 index 41fad55784..42fc26b739 100644 --- a/man2/mkdir.2 +++ b/man2/mkdir.2 @@ -54,7 +54,8 @@ The argument specifies the permissions to use. It is modified by the process's .I umask -in the usual way: the permissions of the created directory are +in the usual way: in the absence of a default acl, the permissions of the +created directory are .RI ( mode " & ~" umask " & 0777)." Other mode bits of the created directory depend on the operating system. For Linux, see below. @@ -212,8 +213,6 @@ POSIX.1-2008. Under Linux, apart from the permission bits, only the .B S_ISVTX mode bit is honored. -That is, under Linux the created directory actually gets mode -.RI ( mode " & ~" umask " & 01777)." See also .BR stat (2). .PP diff --git a/man2/mknod.2 b/man2/mknod.2 index e93c3454a2..7a8dd1e1f9 100644 --- a/man2/mknod.2 +++ b/man2/mknod.2 @@ -63,8 +63,9 @@ listed below and the permissions for the new node. The permissions are modified by the process's .I umask -in the usual way: the permissions of the created node are -.IR "(mode & ~umask)" . +in the usual way: in the absence of a default acl, the permissions of the +created node are +.RI ( mode " & ~" umask ). The file type must be one of .BR S_IFREG , diff --git a/man2/open.2 b/man2/open.2 index 053bab10f3..1d22b58c26 100644 --- a/man2/open.2 +++ b/man2/open.2 @@ -275,7 +275,8 @@ is ignored. The effective permissions are modified by the process's .I umask -in the usual way: The permissions of the created file are +in the usual way: In the absence of a default acl, the permissions of the +created file are .IR "(mode\ &\ ~umask)" . Note that this mode applies only to future accesses of the newly created file; the diff --git a/man2/umask.2 b/man2/umask.2 index e5e57506a5..905f2cdc20 100644 --- a/man2/umask.2 +++ b/man2/umask.2 @@ -63,6 +63,17 @@ argument to and .BR mkdir (2). +Alternatively, if the parent directory has a default acl (see +.BR acl (5)), +the umask is ignored, the default acl is inherited, the permission bits are set +based on the inherited acl, and permission bits absent in the +.I mode +argument are turned off. For example, the default acl +u::rwx,g::r-x,o::r-x is equivalent to a umask of 022, and with a +.I mode +argument of 0666 (rw-rw-rw-), the resulting file permissions are 0644 +(rw-r--r--). + The constants that should be used to specify .I mask are described under |
