Linux-man Archive on
 help / color / Atom feed
From: "Michael Kerrisk (man-pages)" <>
To: kevin dankwardt <>
Subject: Re: [patch] Add note about there is no default permission mode in umask man page
Date: Fri, 24 Jul 2020 13:36:59 +0200
Message-ID: <> (raw)
In-Reply-To: <>

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:

           reply index

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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