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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Pádraig Brady <P <at> draigBrady.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#14972: closed (cp docs should mention permissions result when
 destination already exists)
Date: Sun, 28 Jul 2013 09:51:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 28 Jul 2013 10:50:31 +0100
with message-id <51F4E967.7010202 <at> draigBrady.com>
and subject line Re: bug#14972: cp docs should mention permissions result when destination already exists
has caused the debbugs.gnu.org bug report #14972,
regarding cp docs should mention permissions result when destination already exists
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
14972: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14972
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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


[Message part 3 (message/rfc822, inline)]
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.


This bug report was last modified 11 years and 361 days ago.

Previous Next


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