GNU bug report logs - #14972
cp docs should mention permissions result when destination already exists

Previous Next

Package: coreutils;

Reported by: jidanni <at> jidanni.org

Date: Sun, 28 Jul 2013 03:32: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 14972 in the body.
You can then email your comments to 14972 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#14972; Package coreutils. (Sun, 28 Jul 2013 03:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sun, 28 Jul 2013 03:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: bug-coreutils <at> gnu.org
Subject: cp docs should mention permissions result when destination already
 exists
Date: Sun, 28 Jul 2013 11:31:12 +0800
Fellows, I don't think
(info "(coreutils) cp invocation")
mentions how
$ touch m
$ cp m n
$ chmod 444 m
$ cp m n #THESE LINES
$ cp m p #MAKE DIFFERENT THINGS
$ ls -l
-r--r--r-- 1 jidanni jidanni 0 07-28 11:20 m
-rw-r--r-- 1 jidanni jidanni 0 07-28 11:21 n
-r--r--r-- 1 jidanni jidanni 0 07-28 11:21 p
All we read is

     In the absence of this option, each destination file is created
     with the mode bits of the corresponding source file, minus the
     bits set in the umask and minus the set-user-ID and set-group-ID
     bits.  *Note File permissions::.

So it says 'created', but doesn't mention what happens if the destination
already exists.

Yes I am deliberately not using -p here.

(This would also explain the mystery of how openssh-client: /usr/bin/scp works.)

$ cp --version
cp (GNU coreutils) 8.21




Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Sun, 28 Jul 2013 09:51:02 GMT) Full text and rfc822 format available.

Notification sent to jidanni <at> jidanni.org:
bug acknowledged by developer. (Sun, 28 Jul 2013 09:51:02 GMT) Full text and rfc822 format available.

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

From: Pádraig Brady <P <at> draigBrady.com>
To: jidanni <at> jidanni.org
Cc: 14972-done <at> debbugs.gnu.org
Subject: Re: bug#14972: cp docs should mention permissions result when
 destination already exists
Date: Sun, 28 Jul 2013 10:50:31 +0100
Better to be explicit I suppose.
How about:

-In the absence of this option, each destination file is created with the
+In the absence of this option, the permissions of existing destination
+files are unchanged, while each new file is created with the
 mode bits of the corresponding source file, minus the bits set in the
 umask and minus the set-user-ID and set-group-ID bits.
 @xref{File permissions}.

thanks,
Pádraig.




Information forwarded to bug-coreutils <at> gnu.org:
bug#14972; Package coreutils. (Sun, 28 Jul 2013 15:11:01 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: p <at> draigbrady.com
Cc: 14972-done <at> debbugs.gnu.org
Subject: Re: bug#14972: cp docs should mention permissions result when
 destination already exists
Date: Sun, 28 Jul 2013 23:10:29 +0800
Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 26 Aug 2013 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 262 days ago.

Previous Next


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