Subject: bug#55487: closed (Re: bug#55487: chmod to +w is not defaulting to ALL target in Debian 11.3)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 17 May 2022 21:39:02 +0000

Your bug report

#55487: chmod to +w is not defaulting to ALL target in Debian 11.3

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
55487: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55487
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#55487: chmod to +w is not defaulting to ALL target in Debian 11.3
From: Paul Eggert <[email-masked]>
To: Corey H <[email-masked]>
Cc: [email-masked]
Date: Tue, 17 May 2022 14:38:33 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

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

Subject: chmod to +w is not defaulting to ALL target in Debian 11.3
From: Corey H <[email-masked]>
To: [email-masked]
Date: Tue, 17 May 2022 17:51:37 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

in Debian 8.32-4+b1 (Debian 11.3) chmod +w isn't working right.

sudo mkdir /etc/whatever
sudo touch /etc/whatever/whatever.conf
sudo chmod +w /etc/whatever/whatever.conf #doesn't work
sudo chmod a+w /etc/whatever/whatever.conf #does work
#in
man chmod
# it states "If none of these are given, the effect is as if (a) were given"
# so in conclusion the `sudo chmod +w /etc/whatever/whatever.conf` should
work