From unknown Wed Jun 18 23:05:37 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#25589 <25589@debbugs.gnu.org> To: bug#25589 <25589@debbugs.gnu.org> Subject: Status: Probably a bug in cp Reply-To: bug#25589 <25589@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:05:37 +0000 retitle 25589 Probably a bug in cp reassign 25589 coreutils submitter 25589 Francesco Asnicar severity 25589 normal tag 25589 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 31 11:29:31 2017 Received: (at submit) by debbugs.gnu.org; 31 Jan 2017 16:29:32 +0000 Received: from localhost ([127.0.0.1]:52414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYbJD-0007Ss-M2 for submit@debbugs.gnu.org; Tue, 31 Jan 2017 11:29:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYWSp-0006nj-Ti for submit@debbugs.gnu.org; Tue, 31 Jan 2017 06:19:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYWSj-0007Ed-O8 for submit@debbugs.gnu.org; Tue, 31 Jan 2017 06:19:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39009) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYWSj-0007EZ-L1 for submit@debbugs.gnu.org; Tue, 31 Jan 2017 06:19:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYWSi-00062B-FC for bug-coreutils@gnu.org; Tue, 31 Jan 2017 06:19:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYWSd-0007Dp-Rq for bug-coreutils@gnu.org; Tue, 31 Jan 2017 06:19:00 -0500 Received: from mail-qt0-x233.google.com ([2607:f8b0:400d:c0d::233]:36281) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cYWSd-0007Dl-NL for bug-coreutils@gnu.org; Tue, 31 Jan 2017 06:18:55 -0500 Received: by mail-qt0-x233.google.com with SMTP id k15so230750779qtg.3 for ; Tue, 31 Jan 2017 03:18:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=7GpZudfoSRVCEddvTwDFrOhGS6wb8QSeU8BlGutiw/E=; b=LXZD+pCyG6BwHJc1RSNLiQp+fa7rGSXNdISQ2RkS9yzqEndfQwL2eRrFyvHUR9sUxx BlNGxXQ2O9RQevYtausrd1D8N+oUsoqpDiHPRunComOnlvIkVy8aJ6aKKGmKh0fXXUDO vR3JPrHKG+42+2HVqqS/nYd89Q90m82Y9U/nWmKd24CkS/Mq7k/R73NL4wnBEmN5MA6a LuozAE0avg0qzuubBnywkjGnGPrdo2QELJCB4gYxhDx5kWBE+0nJ7Dv9O1llOAJ7DPts It2ehHVTcCuvHahGJNkwQdqpq/J9p2fJtdTmtV2JTPgukEkM1G1/skhtO5Ox2UtnkO1O UKEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=7GpZudfoSRVCEddvTwDFrOhGS6wb8QSeU8BlGutiw/E=; b=X/1krSVDw3wqf1dzCWZbQQsAyy6Ou6S0NknU2XT1GiaKhs2aRnhckuGuawAC8/ocuV 16iM9M2nU+yLOChhiI9tIIT7WscF0Xm/79PzXa+Uyn+Iirz5lFMOqH3QpKc+wEogSUaj 7zeYhZVykplhFhb0+n2S4ObXF4MwxKNB6Ha9W/46qm0bQwNqD8FZZu3dtreBRu/jj+iW UUpOaqW1ndkzYhO6kPogruRRnbgEbmO5heR/ot+MEn3DOCG9vsh9ml76fF9nobn1nKxY 44YFRxYzpf6TSUg7hQLJzS4f6hWmR7Bsvbys+P+XZgpKPbc6TXZxJoTU/rVO6bgdr1q5 jcKA== X-Gm-Message-State: AIkVDXI0AJ03cpvc+EG/+1gbgFvFSZfeYWo41S+wVmnroe+aldTlPS4N+WjzLzi2a8tcW8IznYb4t3r5SAGWqA== X-Received: by 10.237.63.7 with SMTP id p7mr23639535qtf.34.1485861534830; Tue, 31 Jan 2017 03:18:54 -0800 (PST) MIME-Version: 1.0 From: Francesco Asnicar Date: Tue, 31 Jan 2017 11:18:44 +0000 Message-ID: Subject: Probably a bug in cp To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary=001a113d439cf814280547621857 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 31 Jan 2017 11:29:30 -0500 Cc: Francesco Beghini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -4.0 (----) --001a113d439cf814280547621857 Content-Type: text/plain; charset=UTF-8 Dear all, I'm facing a problem with the cp command when using the -a (or --preserve=all) parameter. The problem is that the ownership of either files and folders is not preserved. I did several tests in which I tried to used different options, like --preserve=all instead of using -a, -p, and --preserve=ownership. I tried different version of cp present in different OS, for instance, the version 8.21 on a Ubuntu 14.04 and the version 8.26 on Arch (update as today). The result, regardless of the version and OS is always the same, the ownership is not preserved. Many thanks, Francesco --001a113d439cf814280547621857 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Dear all,
I'm facing a problem with the cp command= when using the -a (or --preserve=3Dall) parameter.
The problem i= s that the ownership of either files and folders is not preserved.
I did several tests in which I tried to used different options, like --pr= eserve=3Dall instead of using -a, -p, and --preserve=3Downership.
I tried different version of cp present in different OS, for instance, the= version 8.21 on a Ubuntu 14.04 and the version 8.26 on Arch (update as tod= ay).
The result, regardless of the version and OS is always the s= ame, the ownership is not preserved.

Many thanks,<= br>Francesco
--001a113d439cf814280547621857-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 31 13:53:49 2017 Received: (at 25589) by debbugs.gnu.org; 31 Jan 2017 18:53:49 +0000 Received: from localhost ([127.0.0.1]:52554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYdYq-0000pu-TT for submit@debbugs.gnu.org; Tue, 31 Jan 2017 13:53:49 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:62454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYdYo-0000pf-EI for 25589@debbugs.gnu.org; Tue, 31 Jan 2017 13:53:47 -0500 Received: from [192.168.101.10] ([217.87.209.50]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MPGpE-1cUDhq38vw-004PfF; Tue, 31 Jan 2017 19:53:38 +0100 Subject: Re: bug#25589: Probably a bug in cp To: Francesco Asnicar , 25589@debbugs.gnu.org References: From: Bernhard Voelker Message-ID: <4a4b14b5-3813-88fc-f4ea-331561c8e385@bernhard-voelker.de> Date: Tue, 31 Jan 2017 19:53:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:ezIuHfti6x61ccjcxfZhpZxXrFYwOl/PaCwccFcKdqFp89sm/KL Eksf79eyYrlguPM+coN2JQstJ8Yv6Y32EBR+GIsZhsO9tevZ+aoMMjxEGrzPT3JgkgTxSdW 3dyn2b9osPSWvT619XEvLjOUZ6WgYVTfw0tQd/Gx1Z8zFNBt1PFRwkbmLvaQ9aluvdfpnjI L76BYdjN5nmBWnpr+Y0xQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:tLhWXbAL/C4=:K67NtHQ9Z8jc3DubNOKsDQ VGYbyQyLJA2rRzoHFDjTWCC6WljMXBbOxX62GCO+jha5QowbEbs0ic70cM+s8m7sS7C02jIXw ifPniVG8kAl3YtKxkAhNV2XoxFOuGz6ue2xLtv3CkT+w8pNbT6oqwdHgGTmjvNXF+f8yyIVm5 9fqJYRlnJjoHJyYoPaqW61qeAteHomg0kvqh7/zJ7R65CimkBNrfXNI8xSugMrMEBblx94VZy DXDns1nmZcDTx1TsmI17iDf8/7nlrxJuL+rhG2D6yvjJBqz/olWKpxKjp0xXVx+NIy6myd+JW t4uHV5OnziokcQkVA7nXrZvLhYsaRika8rg5VPEXxBUQouO2eYkVVqbG2QFdnFnvktdi99Ctl jVEA5bS6X+IPB7hWaM+zEvKDhnXYryrBH7DuQaXpgEFHCXcyjJYwIpgn0jtx37ipc6HaEKlfT u6EfhNbRNqU+uPNgIK/tAZrr0H9vuqQDPzHtu6TmYGpwYpIOvOBasopLxbinh/nYx1vXOhvG/ o9y5Xb/1QxvMwD4BizA2XmKJVvnPjLqEtjwSYfq8GO/xTkmaWEwil0ZImBVBBB+uk1Nth9rfw C0Ov4bGoPbbbQ5IvyGWwipSkf1Xb0v0OhPmSlciPhAiG9x9hoUAeC6k7wjbqJ2Vr4BYJIk2G9 xRwxLHm/W72lxEwu7lQjUtDh6cuaqiWJFTYKfc1PpvHJurolwL6iWuvpyeylQuNVk3GgnUk4R eyhFxdBgTR4FSWr/ X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 25589 Cc: Francesco Beghini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.1 (-) On 01/31/2017 12:18 PM, Francesco Asnicar wrote: > Dear all, > I'm facing a problem with the cp command when using the -a (or > --preserve=all) parameter. > The problem is that the ownership of either files and folders is not > preserved. > I did several tests in which I tried to used different options, like > --preserve=all instead of using -a, -p, and --preserve=ownership. > I tried different version of cp present in different OS, for instance, the > version 8.21 on a Ubuntu 14.04 and the version 8.26 on Arch (update as > today). > The result, regardless of the version and OS is always the same, the > ownership is not preserved. > > Many thanks, > Francesco You did not provide an example, but I guess that you are running cp(1) as a regular user. From the documentation [1]: ‘-p’ ‘--preserve[=attribute_list]’ ... ‘ownership’ Preserve the owner and group. On most modern systems, only users with appropriate privileges may change the owner of a file, and ordinary users may preserve the group ownership of a file only if they happen to be a member of the desired group. [1] http://www.gnu.org/software/coreutils/cp So on a normal GNU/Linux system, you have to run the command as the root user in order to successfully preserve the ownership. Thus said, it's not the cp(1) utility which is enforcing that rule, but the kernel (for a good reason, of course). Did you fall over this aspect? Thanks & have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 28 04:01:26 2018 Received: (at 25589) by debbugs.gnu.org; 28 Oct 2018 08:01:27 +0000 Received: from localhost ([127.0.0.1]:46579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGg0k-0001mW-I7 for submit@debbugs.gnu.org; Sun, 28 Oct 2018 04:01:26 -0400 Received: from mail-io1-f44.google.com ([209.85.166.44]:44516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGg0h-0001fv-AH; Sun, 28 Oct 2018 04:01:23 -0400 Received: by mail-io1-f44.google.com with SMTP id c6-v6so3138751iob.11; Sun, 28 Oct 2018 01:01:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=DJ0R341FDlMXSF6kuQgzjQUWw6/pcp08LC2WBvg8cvY=; b=idgDkLTc2kOnrD2P0V8o5Tamo7oxi7NBTapSTYzHybd59+hYttlz4h9MwBGpZYlxfr b50re/RQzjF1koa9xDdBt7UzKjMhSrEa0qMO2FFD3UoWis5sUBTXbSCKfK0Y5aQCGRod KuVSeMbbQZn9In0Bazpb/2ilQ7P6Vg4BIc/1JRO39X1BmM1zfIQUjDTtifTjmPmm+u0X 0otm3TE6npNmPi62iLiCMKE/bM5XZtb68t3G8c7rROLqE35Hqy6u4PFavFAg8gMDKzTg YuHNJaMPzh3tnZWdKRQNaJrJwLw0p4eTfuIhigSu3e0vJBHuVq5LC3Fp+2h4wlg7QEM7 QPoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DJ0R341FDlMXSF6kuQgzjQUWw6/pcp08LC2WBvg8cvY=; b=L8H5eWoQTMMKkyK5h97m1gwrx2t5u5llFUheK4esBkID0YNp2OMgxwsgE8Qu4xG0M+ PsVyJDfOQbJWcfEs25E5Tp+RB+gdhcD0kV4so/z5h47dDxtxX6HIA0iaejCIvoMTEllH VhU4SBwKi2jCAirRkXz0JSurqFJTRqah6fLTRkETex954YEqBT47F8xuHtBgkrdYy/1J HD8Log7tDufZG27byPfMBLW9yBeOa9YdSUqVF/w5rAPkKuWp8HjuyZ6qKid1DE97zMPb U1KxBl/0Lx/n77QCeXW6eMNg+DR+Pvs8nuNPzza0HHl01WORIV0KYjxRTpVCSa6+51M2 ciUg== X-Gm-Message-State: AGRZ1gJaiiOb5cmYjrgq1zQRghtdahH8OwL4q9nnCMhj1DWJqwe6BCw+ IJA/LKcQun0iHOMxs2hg4EQm/+0AeSY= X-Google-Smtp-Source: AJdET5evlrCHpozczgXAjG4jJs1C41xlrOfLtd+3PPfEQXnSVZHYzx30lOkIxZwbmxL9Xdfgx70Z8g== X-Received: by 2002:a5e:db05:: with SMTP id q5-v6mr2037155iop.81.1540713677280; Sun, 28 Oct 2018 01:01:17 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id m9-v6sm5733874ioc.29.2018.10.28.01.01.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Oct 2018 01:01:15 -0700 (PDT) Subject: Re: bug#25589: Probably a bug in cp To: 25589@debbugs.gnu.org References: <4a4b14b5-3813-88fc-f4ea-331561c8e385@bernhard-voelker.de> From: Assaf Gordon Message-ID: <19cba1a6-2318-b0ca-2edd-2cbcf47c6216@gmail.com> Date: Sun, 28 Oct 2018 02:01:14 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <4a4b14b5-3813-88fc-f4ea-331561c8e385@bernhard-voelker.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25589 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) tags 25589 moreinfo close 25589 stop (triaging old bugs) On 2017-01-31 11:53 a.m., Bernhard Voelker wrote: > On 01/31/2017 12:18 PM, Francesco Asnicar wrote: >> Dear all, >> I'm facing a problem with the cp command when using the -a (or >> --preserve=all) parameter. [...] > > You did not provide an example, but I guess that you are running cp(1) > as a regular user. From the documentation [1]: > > ‘-p’ > ‘--preserve[=attribute_list]’ [...] > > Did you fall over this aspect? With no further follow-ups, I'm closing this bug. Discussion can continue by replying to this thread. -assaf From unknown Wed Jun 18 23:05:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 25 Nov 2018 12:24:12 +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