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

Full log


View this message in rfc822 format

From: Brian Inglis <Brian.Inglis <at> SystematicSW.ab.ca>
To: 74094 <at> debbugs.gnu.org
Cc: Eric Blake <eblake <at> redhat.com>
Subject: bug#74094: 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




This bug report was last modified 229 days ago.

Previous Next


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