GNU bug report logs - #65599
mv and cp give a pointless warning when moving/copying a directory

Previous Next

Package: coreutils;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Tue, 29 Aug 2023 18:21:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #46 received at 65599-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 65599-done <at> debbugs.gnu.org
Subject: Re: bug#65599: mv and cp give a pointless warning when moving/copying
 a directory
Date: Sat, 2 Sep 2023 13:44:11 -0700
[Message part 1 (text/plain, inline)]
On 2023-09-02 04:18, Bruno Haible wrote:
> chmod fails with EACCES, hence per POSIX
> <https://pubs.opengroup.org/onlinepubs/9699919799/functions/chmod.html>
> it's buggy.

Thanks, I reported the bug with chmod, chown, etc. to the linux-cifs 
mailing list, here:

https://lore.kernel.org/linux-cifs/fe8ab586-c697-583b-650d-3adac64df7b2 <at> cs.ucla.edu/T/#u

I did some testing with fsetxattr and found that it has a similar issue 
even with ext4; for example, setxattr("/", "a", "b", 1, 0) fails with 
EACCES. This is not a POSIX violation, since POSIX lacks setxattr. 
However it's bad form. And it means coreutils needs the attached 
workaround not just for CIFS, but also for ext4 in some (rare) cases.

I installed the attached workaround on coreutils and am closing the bug 
report. Thanks again for mentioning it.
[0001-cp-mv-install-fix-chmod-on-Linux-CIFS.patch (text/x-patch, attachment)]

This bug report was last modified 1 year and 354 days ago.

Previous Next


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