Interesting.

On Tue, May 17, 2022 at 9:38 PM Paul Eggert <egg...@cs.ucla.edu> wrote:

> On 5/17/22 10:51, Corey H wrote:
> > sudo chmod +w /etc/whatever/whatever.conf #doesn't work
> > sudo chmod a+w /etc/whatever/whatever.conf #does work
>
> It sounds like you're misunderstanding what "chmod +w" means. It doesn't
> mean "turn on all the w bits". It means "turn on the w bits enabled by
> the current umask". So, for example, this is expected behavior:
>
> $ umask
> 0022
> $ touch foo
> $ ls -l foo
> -rw-r--r--. 1 eggert eggert 0 May 17 14:37 foo
> $ chmod +w foo
> $ ls -l foo
> -rw-r--r--. 1 eggert eggert 0 May 17 14:37 foo
> $ umask 0
> $ chmod +w foo
> $ ls -l foo
> -rw-rw-rw-. 1 eggert eggert 0 May 17 14:37 foo
>

Reply via email to