GNU bug report logs - #6245
cp - copy files and directories, ls -Rld, chmod

Previous Next

Package: coreutils;

Reported by: "estonoeshawaii <at> yahoo.com" <estonoeshawaii <at> yahoo.com>

Date: Sat, 22 May 2010 07:27:01 UTC

Severity: normal

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Bob Proulx <bob <at> proulx.com>
To: 6245 <at> debbugs.gnu.org
Subject: bug#6245: cp - copy files and directories, ls -Rld, chmod
Date: Sat, 22 May 2010 19:00:30 -0600
Pádraig Brady wrote:
> I noticed myself that `cp --preserve=owner` does not give an
> error when running as non root. A pertinent comment from the source:
> 
>   /* If non-root uses -p, it's ok if we can't preserve ownership.
>      But root probably wants to know, e.g. if NFS disallows it,
>      or if the target system doesn't support file ownership.  */
> 
> Perhaps if "owner" is explicitly specified they we should warn?
> I'm not sure it's worth diverging the warning characteristics
> for this though.

I don't know.  I am not sure I am either for it or against it.  It
seems defensible that --preserve=owner should produce a diagnostic if
it can't actually set the owner.  I couldn't oppose it.  And some
traditional systems such as SysV do allow giving away file ownership.

I know you are not talking about cp -a but I wanted to say that I
often use cp -a to copy files not owned by me into my directory to
make a working copy that I can change.  If it started to produce
errors or warnings that would be bad.  I certainly think that behavior
shouldn't change or it would create a large problem for users.

Bob




This bug report was last modified 15 years and 82 days ago.

Previous Next


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