GNU bug report logs - #74094
chgrp/chmod/chown fails to recognize "root" and respect --preserve-root under Cygwin

Previous Next

Package: coreutils;

Reported by: Brian.Inglis <at> SystematicSW.ab.ca

Date: Tue, 29 Oct 2024 18:58:02 UTC

Severity: normal

To reply to this bug, email your comments to 74094 AT debbugs.gnu.org.

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#74094; Package coreutils. (Tue, 29 Oct 2024 18:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brian.Inglis <at> SystematicSW.ab.ca:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 29 Oct 2024 18:58:02 GMT) Full text and rfc822 format available.

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

From: Brian Inglis <Brian.Inglis <at> SystematicSW.ab.ca>
To: bug-coreutils <at> gnu.org
Cc: Eric Blake <eblake <at> redhat.com>
Subject: chgrp/chmod/chown fails to recognize "root" and respect
 --preserve-root under Cygwin
Date: Tue, 29 Oct 2024 12:57:33 -0600
Hi folks,

I now appear to have the issue that the Cygwin emulated "root" is not being 
detected and handled properly, so during tests, chgrp/chown/chmod 
--preserve-root is being ignored, also presumably rm!, tests are taking forever, 
and all my account and CI system mount points are being trashed by the tests, 
and build/gt-preserve-root.sh.XKPb/out is over 1GB!

I need to understand whether any access to "root" is just warned and skipped, or 
the command is terminated with prejudice, as I would expect.

The info docs section "Treating ‘/’ specially" appears to be ambiguous about the 
ch??? commands, except that they default to --no-preserve-root whereas the man 
pages say "fail to operate recursively on ’/’", as I would expect.

I know that I will have to handle the "root" issue, but advice on how the 
commands are conceptually expected to deal with "root" and --preserve-root would 
be useful, and any gotchas on other systems, before I dig into then hack at the 
operations.

Cygwin would probably want to default these ch??? commands to --preserve-root 
like rm, and also require -f, --force --no-preserve-root to override, but ch??? 
redefine -f to --silent, --quiet, so would have to mandate the long --force 
option with --preserve-root, and also change the docs!

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                -- Antoine de Saint-Exupéry




Information forwarded to bug-coreutils <at> gnu.org:
bug#74094; Package coreutils. (Tue, 29 Oct 2024 21:26:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Brian.Inglis <at> SystematicSW.ab.ca
Cc: 74094 <at> debbugs.gnu.org, Eric Blake <eblake <at> redhat.com>
Subject: Re: bug#74094: chgrp/chmod/chown fails to recognize "root" and
 respect --preserve-root under Cygwin
Date: Tue, 29 Oct 2024 14:25:46 -0700
On 2024-10-29 11:57, Brian Inglis wrote:
> advice on how the commands are conceptually expected to deal with "root" 
> and --preserve-root would be useful

Presumably the way that "/" is treated on a GNU platform should be the 
way that a root filesystem is treated on Cygwin, even if that root 
filesystem isn't named "/".




This bug report was last modified 228 days ago.

Previous Next


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