GNU bug report logs -
#24251
Potential cp bug: directories created with --parents and --no-preserve=mode retain original mode bits don't match ~umask
Previous Next
Reported by: Mark Mitchell <mark81 <at> gmail.com>
Date: Wed, 17 Aug 2016 15:35:02 UTC
Severity: normal
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24251 in the body.
You can then email your comments to 24251 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#24251
; Package
coreutils
.
(Wed, 17 Aug 2016 15:35:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mark Mitchell <mark81 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Wed, 17 Aug 2016 15:35:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
I'm writing to report a potential bug with cp. I don't think the mode bits
always get properly set on directories created when using the --parents
option combined with --no-preserve=mode option. I'm not sure what the
expected behaviour is supposed to be, but my assumption is that the created
directories would match process's ~umask (like mkdir -p).
I've attached a simple script and its output to demonstrate the behaviour.
I've tested this on the most recent master branch of the coreutils git
repository (output of git describe is 'v8.25-55-gff2178b').
Thanks for your efforts on these utilities, it is much appreciated :-).
-Mark
[Message part 2 (text/html, inline)]
[test-output.txt (text/plain, attachment)]
[test-cp-parents-umask.sh (application/x-sh, attachment)]
Reply sent
to
Pádraig Brady <P <at> draigBrady.com>
:
You have taken responsibility.
(Thu, 18 Aug 2016 12:58:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mark Mitchell <mark81 <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 18 Aug 2016 12:58:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 24251-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 17/08/16 12:42, Mark Mitchell wrote:
> Hi,
>
> I'm writing to report a potential bug with cp. I don't think the mode bits
> always get properly set on directories created when using the --parents
> option combined with --no-preserve=mode option. I'm not sure what the
> expected behaviour is supposed to be, but my assumption is that the created
> directories would match process's ~umask (like mkdir -p).
>
> I've attached a simple script and its output to demonstrate the behaviour.
> I've tested this on the most recent master branch of the coreutils git
> repository (output of git describe is 'v8.25-55-gff2178b').
>
> Thanks for your efforts on these utilities, it is much appreciated :-).
I agree that's unexpected, especially since cp -r --no-preserve=mode
does not copy the permissions for created dirs.
I think this may have changed with:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v5.92-435-gfdffb6b
I've adjusted things back in the attached.
thanks,
Pádraig.
[cp-parents-no-preserve-mode.patch (text/x-patch, attachment)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#24251
; Package
coreutils
.
(Thu, 18 Aug 2016 14:40:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 24251 <at> debbugs.gnu.org (full text, mbox):
On Thu, Aug 18, 2016 at 5:57 AM, Pádraig Brady <P <at> draigbrady.com> wrote:
> On 17/08/16 12:42, Mark Mitchell wrote:
>> Hi,
>>
>> I'm writing to report a potential bug with cp. I don't think the mode bits
>> always get properly set on directories created when using the --parents
>> option combined with --no-preserve=mode option. I'm not sure what the
>> expected behaviour is supposed to be, but my assumption is that the created
>> directories would match process's ~umask (like mkdir -p).
>>
>> I've attached a simple script and its output to demonstrate the behaviour.
>> I've tested this on the most recent master branch of the coreutils git
>> repository (output of git describe is 'v8.25-55-gff2178b').
>>
>> Thanks for your efforts on these utilities, it is much appreciated :-).
>
> I agree that's unexpected, especially since cp -r --no-preserve=mode
> does not copy the permissions for created dirs.
>
> I think this may have changed with:
> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v5.92-435-gfdffb6b
>
> I've adjusted things back in the attached.
That looks right. Thank you!
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#24251
; Package
coreutils
.
(Thu, 18 Aug 2016 14:40:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#24251
; Package
coreutils
.
(Fri, 19 Aug 2016 02:37:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 24251 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Wow that was quick -- thanks again for your time,
-Mark
On Thu, Aug 18, 2016 at 2:38 PM, Jim Meyering <jim <at> meyering.net> wrote:
> On Thu, Aug 18, 2016 at 5:57 AM, Pádraig Brady <P <at> draigbrady.com> wrote:
> > On 17/08/16 12:42, Mark Mitchell wrote:
> >> Hi,
> >>
> >> I'm writing to report a potential bug with cp. I don't think the mode
> bits
> >> always get properly set on directories created when using the --parents
> >> option combined with --no-preserve=mode option. I'm not sure what the
> >> expected behaviour is supposed to be, but my assumption is that the
> created
> >> directories would match process's ~umask (like mkdir -p).
> >>
> >> I've attached a simple script and its output to demonstrate the
> behaviour.
> >> I've tested this on the most recent master branch of the coreutils git
> >> repository (output of git describe is 'v8.25-55-gff2178b').
> >>
> >> Thanks for your efforts on these utilities, it is much appreciated :-).
> >
> > I agree that's unexpected, especially since cp -r --no-preserve=mode
> > does not copy the permissions for created dirs.
> >
> > I think this may have changed with:
> > http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;
> h=v5.92-435-gfdffb6b
> >
> > I've adjusted things back in the attached.
>
> That looks right. Thank you!
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#24251
; Package
coreutils
.
(Fri, 19 Aug 2016 02:37:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 16 Sep 2016 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 335 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.