GNU bug report logs - #29788
chown: recursive operation with "-H" flag does not work as documented

Previous Next

Package: coreutils;

Reported by: Michael Orlitzky <michael <at> orlitzky.com>

Date: Wed, 20 Dec 2017 18:31:01 UTC

Severity: normal

Tags: notabug

Done: Bernhard Voelker <mail <at> bernhard-voelker.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Orlitzky <michael <at> orlitzky.com>
To: 29788-done <at> debbugs.gnu.org
Subject: bug#29788: chown: recursive operation with "-H" flag does not work as documented
Date: Wed, 20 Dec 2017 16:26:56 -0500
On 12/20/2017 03:58 PM, Bernhard Voelker wrote:
> 
> I think there is something else going on you didn't consider:
> 
>        --dereference      affect the referent of each symbolic link (this is
>                           the default), rather than the symbolic link itself
> 
> ...
> 
> Thus, I think this not a bug in chmod or the documentation, but in the
> your expectations.  Therefore, I'm marking this as not-a-bug in our bug
> tracker.  Of course, you are welcome to continue the discussion, and if
> needed we can reopen this issue at a later point.
> 

Thank you, you might be right. To explain how I wound up in this
situation, what I was actually running was,

  $ chown --recursive --dereference root foo

which emits an error:

  chown: -R --dereference requires either -H or -L

At that point, I consulted the documentation to see how "-H" and "-L"
differ:

  -H  if a command line argument is a symbolic link  to  a  directory,
      traverse it

  -L  traverse every symbolic link to a directory encountered

By way of omission I expected -H not to follow directory symlinks that
weren't explicitly passed, but I can see how the interpretation could go
either way. The choice of "-H" or "-L" adds to the "--dereference"
option, whereas I thought it was asking me to choose (only) one of the
two modes of operation.

Thanks for your time.





This bug report was last modified 7 years and 153 days ago.

Previous Next


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