bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28875: 25.3.50; set-default-file-modes ignores execution bits


From: Andreas Schwab
Subject: bug#28875: 25.3.50; set-default-file-modes ignores execution bits
Date: Fri, 20 Oct 2017 09:53:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

On Okt 20 2017, Tino Calancha <tino.calancha@gmail.com> wrote:

> diff --git a/src/fileio.c b/src/fileio.c
> index b7df38c857..d707bfc1c6 100644
> --- a/src/fileio.c
> +++ b/src/fileio.c
> @@ -3125,7 +3125,11 @@ symbolic notation, like the `chmod' command from GNU 
> Coreutils.  */)
>  DEFUN ("set-default-file-modes", Fset_default_file_modes, 
> Sset_default_file_modes, 1, 1, 0,
>         doc: /* Set the file permission bits for newly created files.
>  The argument MODE should be an integer; only the low 9 bits are used.
> -This setting is inherited by subprocesses.  */)
> +This setting is inherited by subprocesses.
> +
> +Note that some functions (e.g., `write-region') ignore the execution
> +bits in MODE.  In that case you need first to create the file,
> +and then set the permisions with `set-file-modes'.  */)

The umask cannot broaden the permissions, only restrict them.  The zero
bits specify the bits that are always cleared from the mode, the one
bits leave them unmodified.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]