GNU bug report logs - #55487
chmod to +w is not defaulting to ALL target in Debian 11.3

Previous Next

Package: coreutils;

Reported by: Corey H <user9de1d <at> gmail.com>

Date: Tue, 17 May 2022 18:32:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55487 in the body.
You can then email your comments to 55487 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#55487; Package coreutils. (Tue, 17 May 2022 18:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Corey H <user9de1d <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 17 May 2022 18:32:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Corey H <user9de1d <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: chmod to +w is not defaulting to ALL target in Debian 11.3
Date: Tue, 17 May 2022 17:51:37 +0000
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Tue, 17 May 2022 21:39:02 GMT) Full text and rfc822 format available.

Notification sent to Corey H <user9de1d <at> gmail.com>:
bug acknowledged by developer. (Tue, 17 May 2022 21:39:02 GMT) Full text and rfc822 format available.

Message #10 received at 55487-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Corey H <user9de1d <at> gmail.com>
Cc: 55487-done <at> debbugs.gnu.org
Subject: Re: bug#55487: chmod to +w is not defaulting to ALL target in Debian
 11.3
Date: Tue, 17 May 2022 14:38:33 -0700
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




Information forwarded to bug-coreutils <at> gnu.org:
bug#55487; Package coreutils. (Wed, 18 May 2022 18:29:02 GMT) Full text and rfc822 format available.

Message #13 received at 55487-done <at> debbugs.gnu.org (full text, mbox):

From: Corey H <user9de1d <at> gmail.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 55487-done <at> debbugs.gnu.org
Subject: Re: bug#55487: chmod to +w is not defaulting to ALL target in Debian
 11.3
Date: Wed, 18 May 2022 17:42:02 +0000
[Message part 1 (text/plain, inline)]
Interesting.

On Tue, May 17, 2022 at 9:38 PM Paul Eggert <eggert <at> 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
>
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 16 Jun 2022 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.