GNU bug report logs - #30534
cp - Possible bugs when not preserving mode (explicit) and when copying special files

Previous Next

Package: coreutils;

Reported by: Declercq Laurent <l.declercq <at> nuxwin.com>

Date: Mon, 19 Feb 2018 17:31:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Declercq Laurent <l.declercq <at> nuxwin.com>
To: Pádraig Brady <P <at> draigBrady.com>, 30534 <at> debbugs.gnu.org
Subject: bug#30534: cp - Possible bugs when not preserving mode (explicit) and when copying special files
Date: Tue, 20 Feb 2018 09:04:49 +0100
[Message part 1 (text/plain, inline)]
Le 20/02/2018 à 04:26, Pádraig Brady a écrit :
>> 2. Non-permission bits are preserved, even when the --no-preserve=mode
>> option is involved.
>>
>> Original file to copy: prwSrw-rw- 1 root staff 0 févr. 18 18:59 spfile
>> cp(1) command (run as root user): cp -r --no-preserve=mode spfile
>> spfile_copy
>>
>> Current result:
>>
>> prwsr-xr-x 1 root staff 0 févr. 18 22:05 spfile_copy
> I'm not seeing this. I get 'x' rather than 's' here (and '-' with the fix)
>
>> Expected result (considering UMASK 0022 and without the first bug above):
>>
>> prw-r--r-- 1 root staff 0 févr. 18 22:05 spfile_copy
> thanks!
> Pádraig
>

I'll make a new try, providing you relevant STRACE(1) output if necessary.

Thank you for your fast reaction.

[l_declercq.vcf (text/x-vcard, attachment)]

This bug report was last modified 7 years and 85 days ago.

Previous Next


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