Subject: bug#14972: closed (Re: bug#14972: cp docs should mention permissions result when destination already exists)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 28 Jul 2013 09:51:02 +0000

Your bug report

#14972: cp docs should mention permissions result when destination already exists

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
14972: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14972
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#14972: cp docs should mention permissions result when destination already exists
From: Pádraig Brady <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Sun, 28 Jul 2013 10:50:31 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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.

Subject: cp docs should mention permissions result when destination already exists
From: [email-masked]
To: [email-masked]
Date: Sun, 28 Jul 2013 11:31:12 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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