From unknown Tue Aug 19 21:03:36 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#14972 <14972@debbugs.gnu.org> To: bug#14972 <14972@debbugs.gnu.org> Subject: Status: cp docs should mention permissions result when destination already exists Reply-To: bug#14972 <14972@debbugs.gnu.org> Date: Wed, 20 Aug 2025 04:03:36 +0000 retitle 14972 cp docs should mention permissions result when destination al= ready exists reassign 14972 coreutils submitter 14972 jidanni@jidanni.org severity 14972 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 27 23:31:45 2013 Received: (at submit) by debbugs.gnu.org; 28 Jul 2013 03:31:45 +0000 Received: from localhost ([127.0.0.1]:53705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3Hhw-0008CS-TF for submit@debbugs.gnu.org; Sat, 27 Jul 2013 23:31:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42082) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3Hht-0008Bx-8z for submit@debbugs.gnu.org; Sat, 27 Jul 2013 23:31:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3Hhg-0000pw-Ql for submit@debbugs.gnu.org; Sat, 27 Jul 2013 23:31:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3Hhg-0000pr-NM for submit@debbugs.gnu.org; Sat, 27 Jul 2013 23:31:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3Hha-0004VV-KT for bug-coreutils@gnu.org; Sat, 27 Jul 2013 23:31:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3HhU-0000pB-GR for bug-coreutils@gnu.org; Sat, 27 Jul 2013 23:31:22 -0400 Received: from caiajhbdcbhh.dreamhost.com ([208.97.132.177]:34733 helo=homiemail-a62.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3HhU-0000p7-7k for bug-coreutils@gnu.org; Sat, 27 Jul 2013 23:31:16 -0400 Received: from homiemail-a62.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a62.g.dreamhost.com (Postfix) with ESMTP id 4D11763406F for ; Sat, 27 Jul 2013 20:31:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=WwsSktXnqUowVgOIjmAbp3S8oG0=; b=IUMfds37rRYG4kLO xAu9wVEPXNB7K/uvJu47jdWW5AUyPNziFP5F5qyKi0KIptJRKgvzkakrf6qBjJ+v oW3xvafMQ8Tskj2RH7MGIfbHK7tJRpsN7v8lybXAR3Op7HhucHsQXIGaulobkzbT n84j6pmr6+oFEcgjpfHUXK3aKmQ= Received: from jidanni.org (114-26-45-14.dynamic.hinet.net [114.26.45.14]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a62.g.dreamhost.com (Postfix) with ESMTPSA id 08D1763406E for ; Sat, 27 Jul 2013 20:31:14 -0700 (PDT) From: jidanni@jidanni.org To: bug-coreutils@gnu.org Subject: cp docs should mention permissions result when destination already exists Date: Sun, 28 Jul 2013 11:31:12 +0800 Message-ID: <87zjt78inz.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 28 05:50:40 2013 Received: (at 14972-done) by debbugs.gnu.org; 28 Jul 2013 09:50:41 +0000 Received: from localhost ([127.0.0.1]:54013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3Nce-0005rl-FM for submit@debbugs.gnu.org; Sun, 28 Jul 2013 05:50:40 -0400 Received: from mail1.vodafone.ie ([213.233.128.43]:18744) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3Ncb-0005qz-Rb for 14972-done@debbugs.gnu.org; Sun, 28 Jul 2013 05:50:38 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAF/o9FFtTb8C/2dsb2JhbAANTcFdgS6DGQEBBDIBRhALDRQWDwkDAgECAUUTAQcBAa4DkV2PfQcWg28DniWMYYE6 Received: from unknown (HELO [192.168.1.79]) ([109.77.191.2]) by mail1.vodafone.ie with ESMTP; 28 Jul 2013 10:50:31 +0100 Message-ID: <51F4E967.7010202@draigBrady.com> Date: Sun, 28 Jul 2013 10:50:31 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: jidanni@jidanni.org Subject: Re: bug#14972: cp docs should mention permissions result when destination already exists References: <87zjt78inz.fsf@jidanni.org> In-Reply-To: <87zjt78inz.fsf@jidanni.org> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14972-done Cc: 14972-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 28 11:10:38 2013 Received: (at 14972-done) by debbugs.gnu.org; 28 Jul 2013 15:10:38 +0000 Received: from localhost ([127.0.0.1]:54520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3ScH-0006Rq-8d for submit@debbugs.gnu.org; Sun, 28 Jul 2013 11:10:37 -0400 Received: from caiajhbdcbef.dreamhost.com ([208.97.132.145]:52053 helo=homiemail-a99.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3ScE-0006Rb-0X for 14972-done@debbugs.gnu.org; Sun, 28 Jul 2013 11:10:34 -0400 Received: from homiemail-a99.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a99.g.dreamhost.com (Postfix) with ESMTP id 016D3FB006F; Sun, 28 Jul 2013 08:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=jidanni.org; bh=58TUtX7PRKuYWjlTJ473tDInOi0=; b=Hn8HIB0Jw7ccV EfU4i/5H7T/H8hLol5BOYnXAIgvE5N5zQClCvadG52ENAGP9/1LrvfXiWrzz7KlN 4RYAI8Dd0FpYFzzxEOxKcTKEAZ87ZdtRgYqcy88aXzGcOqvX6gTuPFlAcAEXC20i jkZHaWbpFW3EPZrvoDdPLaaHWU6Oik= Received: from jidanni.org (36-234-0-187.dynamic-ip.hinet.net [36.234.0.187]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a99.g.dreamhost.com (Postfix) with ESMTPSA id AE556FB006D; Sun, 28 Jul 2013 08:10:32 -0700 (PDT) From: jidanni@jidanni.org To: p@draigbrady.com Subject: Re: bug#14972: cp docs should mention permissions result when destination already exists References: <51F4E967.7010202@draigBrady.com> Date: Sun, 28 Jul 2013 23:10:29 +0800 Message-ID: <87r4eien4q.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14972-done Cc: 14972-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Thanks. From unknown Tue Aug 19 21:03:36 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 26 Aug 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator