GNU bug report logs - #79433
9.7: cp(1): lchownat(2/3) fallback bogus?

Previous Next

Package: coreutils;

Reported by: Steffen Nurpmeso <steffen <at> sdaoden.eu>

Date: Thu, 11 Sep 2025 11:51:02 UTC

Severity: normal

Found in version 9.7

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Steffen Nurpmeso <steffen <at> sdaoden.eu>
Cc: 79433 <at> debbugs.gnu.org
Subject: bug#79433: 9.7: cp(1): lchownat(2/3) fallback bogus?
Date: Wed, 17 Sep 2025 21:58:07 -0700
On 2025-09-17 09:46, Steffen Nurpmeso wrote:
> (Just wondering, the final cp(1) should work for all
> configurable cases if config succeeds;

That sounds pretty ambitious! The main goal here is merely for coreutils 
to work on practical platforms.

> But that is not via fakeroot?

No, I'm not using fakeroot. I don't recommend using fakeroot for 
'configure', for all the usual reasons.

> Fakeroot fails to chown but ignores the error, yet the failed
> system call avoids getting the filestamp updated.

Clearly a bug in fakeroot. POSIX says the file timestamp must be updated.

> i do
> *not* want to be root in the namespace.

That's fine. 'configure' need not be run as root. I don't recommend 
running it as root.

> Having said all that, and fakeroot aside, GNU cp(1) should not
> exit error if it fails to preserve permissions for a symbolic link

GNU cp does not try to change the permissions of a symlink.

>    #?0|kent:tmp$ /bin/cp -a xb xc
>    cp: failed to preserve ownership for xc: Operation not supported

That's not preserving permissions; it's preserving ownership. It's a 
different system call, with quite different semantics.





This bug report was last modified 1 day ago.

Previous Next


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