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


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 65599 <at> debbugs.gnu.org
Subject: bug#65599: mv and cp give a pointless warning when moving/copying a directory
Date: Fri, 1 Sep 2023 10:47:40 -0700
[Message part 1 (text/plain, inline)]
On 2023-09-01 08:09, Bruno Haible wrote:
> It applies to all 4 variants, as can be seen from applying it to a directory:
> 
> $ ./a.out /media/nas/bruno/dir1
> lchown: Permission denied
> fchownat: Permission denied
> chown: Permission denied
> fchown: Permission denied

Thanks, for coreutils it'd be helpful to now whether there's a similar 
problem with chmod-related syscalls. If you compile and run the attached 
program on a file that you don't own (e.g., './a.out /'), does it 
incorrectly issue "Permission denied" instead of "Operation not 
permitted" diagnostics?
[fchmodat-test.c (text/x-csrc, 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.