[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6245: cp - copy files and directories, ls -Rld, chmod
From: |
Bob Proulx |
Subject: |
bug#6245: cp - copy files and directories, ls -Rld, chmod |
Date: |
Sat, 22 May 2010 19:00:30 -0600 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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