Linux-man Archive on
 help / color / Atom feed
* Re: [patch] Add note about there is no default permission mode in umask man page
       [not found] <>
@ 2020-07-24 11:36 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; only message in thread
From: Michael Kerrisk (man-pages) @ 2020-07-24 11:36 UTC (permalink / raw)
  To: kevin dankwardt; +Cc: mtk.manpages, linux-man

Hi Kevin!

On 7/23/20 8:39 PM, kevin dankwardt wrote:
> man pages version 5.08
>>From 884004f93893cb01002d886387c78ba58d1aff53 Mon Sep 17 00:00:00 2001
> From: Kevin Dankwardt <>
> Date: Thu, 23 Jul 2020 11:31:55 -0700
> Subject: [PATCH] Add note about there is no default permission mode
> ---
>  man2/umask.2 | 2 ++
>  1 file changed, 2 insertions(+)
> diff --git a/man2/umask.2 b/man2/umask.2
> index e74e8ef..6bc8ba1 100644
> --- a/man2/umask.2
> +++ b/man2/umask.2
> @@ -138,6 +138,8 @@ Inspecting this field in
>  .IR /proc/self/status
>  allows a process to retrieve its umask without at the same time changing
> it.
>  .PP
> +The Linux kernel has no default permission modes for created files or
> directories and thus the permission modes are non-deterministic for a file
> or directory created with no requested permission modes.
> +.PP
>  The umask setting also affects the permissions assigned to POSIX IPC
> objects
>  .RB ( mq_open (3),
>  .BR sem_open (3),

The umask(2) page seems the wrong place for a note such as this,
since this doesn't really relate to the umask. I assume that what
you really care about here is a call to open(2) that wrongly 
omits mode:

fd = open(path, O_CREAT | O_RDWR);

The open(2) manual page already warns against that, but I have 
reworded the text in that page a little to further emphasize the



Michael Kerrisk
Linux man-pages maintainer;
Linux/UNIX System Programming Training:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
2020-07-24 11:36 ` [patch] Add note about there is no default permission mode in umask man page Michael Kerrisk (man-pages)

Linux-man Archive on

Archives are clonable:
	git clone --mirror linux-man/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-man linux-man/ \
	public-inbox-index linux-man

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone