GNU bug report logs - #13601
mv should not silently lose file extended attributes

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: jf@HIDDEN; dated Thu, 31 Jan 2013 19:15:02 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 13601 <at> debbugs.gnu.org:


Received: (at 13601) by debbugs.gnu.org; 1 Feb 2013 07:00:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 01 02:00:23 2013
Received: from localhost ([127.0.0.1]:58507 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U1Abm-0008Rc-Nn
	for submit <at> debbugs.gnu.org; Fri, 01 Feb 2013 02:00:23 -0500
Received: from smtp4-g21.free.fr ([212.27.42.4]:49726)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jf@HIDDEN>) id 1U1Abj-0008RQ-2t
	for 13601 <at> debbugs.gnu.org; Fri, 01 Feb 2013 02:00:21 -0500
Received: from y.dockes.com (unknown [82.227.105.245])
	by smtp4-g21.free.fr (Postfix) with ESMTP id D595B4C80EE;
	Fri,  1 Feb 2013 07:59:25 +0100 (CET)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Message-ID: <20747.26572.404731.568669@HIDDEN>
Date: Fri, 1 Feb 2013 07:59:24 +0100
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@HIDDEN>
Subject: Re: bug#13601: mv should not silently lose file extended attributes
In-Reply-To: <510B0B90.805@HIDDEN>
References: <20746.49334.569751.252972@HIDDEN>
	<510B0B90.805@HIDDEN>
X-Mailer: VM 8.1.0 under 23.4.1 (x86_64-pc-linux-gnu)
From: jf@HIDDEN
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 13601
Cc: 13601 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

P=E1draig Brady writes:
 > On 01/31/2013 07:06 PM, jf@HIDDEN wrote:
 > >
 > > When moving a file having extended attributes to a target filesyst=
em which
 > > does not support them (e.g. an NFS mount), the attributes are sile=
ntly
 > > lost.
 > >
 > > I think that mv should not complete the move in this case, as the =
current
 > > behaviour leads to silent and unexpected data loss.
 > >
 > > Ideally, this behaviour should be controlled by an option, but I t=
hink that
 > > the default should be to refuse to lose data.
 > >
 > > mv version: mv (GNU coreutils) 8.13
 > > Checked on Ubuntu 12.04 (probably not relevant).
 >=20
 > The previous discussion on that was at:
 > http://lists.gnu.org/archive/html/bug-coreutils/2009-04/threads.html=
#00174
 > and the corresponding diagnostics supression patch at:
 > http://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommit;h=3D941bd=
48
 >=20
 > I'm inclined to agree there should be some diagnostics.
 > Perhaps we could output diagnostics as normal, but only
 > try the operation once that gives ENOTSUP?
 >=20
 > thanks,
 > P=E1draig.

Hi,

I should have guessed that this was not the first time this came up, bu=
t I
could not find another bug report.

Here is what I think in a bit more detail: extended attributes could be=

very useful, but people won't use them as long as commands treat them a=
s
discardable data. They are as precious as main file data (think tagging=
 for
example, a lot of effort).

In my opinion the default for 'mv' should be to not complete the operat=
ion
if it would lose data from the source:=20

   - This is consistent with 'dangerous' uses of 'mv' which may sometim=
es
     clobber the target but *never* lose the source.

   - This is just plain common sense, as most people are not aware of
     subtle filesystem differences, and, for example, will mostly not k=
now
     that NFS does not support extended attributes. You should not have=
 to
     be a filesystem expert to use the command line safely.

Completing the move and printing an error message is just adding insult=

to injury: the data is gone and the message indicates that 'mv' should
have known not to do it but did it anyway ! 'cp' does not present the s=
ame
issue as as the original is still there.

If there is a strong reason not to implement this behaviour (I can only=

imagine some POSIXy compliance issue), there should at the very least e=
xist
a non-default option for 'mv' to behave in this way, like -i will preve=
nt
clobbering a target. One possibility would be to overload -i (not an
optimal approach). People could then alias the option into their common=

usage or not.

I would prefer the first approach, with -f to force the move for exampl=
e.

I should add for the record that I have been using a command line since=

1986 (Unix v7). This current behaviour in 'mv' hurts both my rationalit=
y
and a sense of style which had some time to form...

Regards,

Jean-Fran=E7ois Dock=E8s




Information forwarded to bug-coreutils@HIDDEN:
bug#13601; Package coreutils. Full text available.

Message received at 13601 <at> debbugs.gnu.org:


Received: (at 13601) by debbugs.gnu.org; 1 Feb 2013 00:26:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 31 19:26:45 2013
Received: from localhost ([127.0.0.1]:58262 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U14Sq-00066c-GG
	for submit <at> debbugs.gnu.org; Thu, 31 Jan 2013 19:26:44 -0500
Received: from mx1.redhat.com ([209.132.183.28]:10812)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <P@HIDDEN>) id 1U14Sn-00066T-ES
	for 13601 <at> debbugs.gnu.org; Thu, 31 Jan 2013 19:26:42 -0500
Received: from int-mx02.intmail.prod.int.phx2.redhat.com
	(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r110PtIu022938
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 31 Jan 2013 19:25:55 -0500
Received: from [10.36.116.54] (ovpn-116-54.ams2.redhat.com [10.36.116.54])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id r110PqF2017999
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 31 Jan 2013 19:25:54 -0500
Message-ID: <510B0B90.805@HIDDEN>
Date: Fri, 01 Feb 2013 00:25:52 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: jf@HIDDEN
Subject: Re: bug#13601: mv should not silently lose file extended attributes
References: <20746.49334.569751.252972@HIDDEN>
In-Reply-To: <20746.49334.569751.252972@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	r110PtIu022938
X-Spam-Score: -4.2 (----)
X-Debbugs-Envelope-To: 13601
Cc: 13601 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.0 (-----)

On 01/31/2013 07:06 PM, jf@HIDDEN wrote:
>
> When moving a file having extended attributes to a target filesystem wh=
ich
> does not support them (e.g. an NFS mount), the attributes are silently
> lost.
>
> I think that mv should not complete the move in this case, as the curre=
nt
> behaviour leads to silent and unexpected data loss.
>
> Ideally, this behaviour should be controlled by an option, but I think =
that
> the default should be to refuse to lose data.
>
> mv version: mv (GNU coreutils) 8.13
> Checked on Ubuntu 12.04 (probably not relevant).

The previous discussion on that was at:
http://lists.gnu.org/archive/html/bug-coreutils/2009-04/threads.html#0017=
4
and the corresponding diagnostics supression patch at:
http://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommit;h=3D941bd48

I'm inclined to agree there should be some diagnostics.
Perhaps we could output diagnostics as normal, but only
try the operation once that gives ENOTSUP?

thanks,
P=E1draig.




Information forwarded to bug-coreutils@HIDDEN:
bug#13601; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Jan 2013 19:14:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 31 14:14:56 2013
Received: from localhost ([127.0.0.1]:58013 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U0zb6-0006Tj-9p
	for submit <at> debbugs.gnu.org; Thu, 31 Jan 2013 14:14:56 -0500
Received: from eggs.gnu.org ([208.118.235.92]:50892)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jf@HIDDEN>) id 1U0zTp-0006Ip-V3
	for submit <at> debbugs.gnu.org; Thu, 31 Jan 2013 14:07:26 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jf@HIDDEN>) id 1U0zT6-00043m-Pr
	for submit <at> debbugs.gnu.org; Thu, 31 Jan 2013 14:06:42 -0500
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, USER_IN_WHITELIST
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:42485)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jf@HIDDEN>) id 1U0zT6-00043b-N7
	for submit <at> debbugs.gnu.org; Thu, 31 Jan 2013 14:06:40 -0500
Received: from eggs.gnu.org ([208.118.235.92]:34011)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jf@HIDDEN>) id 1U0zT5-0003fj-PQ
	for bug-coreutils@HIDDEN; Thu, 31 Jan 2013 14:06:40 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jf@HIDDEN>) id 1U0zT4-00043F-N9
	for bug-coreutils@HIDDEN; Thu, 31 Jan 2013 14:06:39 -0500
Received: from smtp4-g21.free.fr ([2a01:e0c:1:1599::13]:53938)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jf@HIDDEN>) id 1U0zT3-00042Q-UY
	for bug-coreutils@HIDDEN; Thu, 31 Jan 2013 14:06:38 -0500
Received: from y.dockes.com (unknown [82.227.105.245])
	by smtp4-g21.free.fr (Postfix) with ESMTP id D59514C8037
	for <bug-coreutils@HIDDEN>; Thu, 31 Jan 2013 20:06:31 +0100 (CET)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Message-ID: <20746.49334.569751.252972@HIDDEN>
Date: Thu, 31 Jan 2013 20:06:30 +0100
To: <bug-coreutils@HIDDEN>
Subject: mv should not silently lose file extended attributes
X-Mailer: VM 8.1.0 under 23.4.1 (x86_64-pc-linux-gnu)
From: jf@HIDDEN
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -4.2 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 31 Jan 2013 14:14:54 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.0 (-----)


When moving a file having extended attributes to a target filesystem wh=
ich
does not support them (e.g. an NFS mount), the attributes are silently
lost.

I think that mv should not complete the move in this case, as the curre=
nt
behaviour leads to silent and unexpected data loss.

Ideally, this behaviour should be controlled by an option, but I think =
that
the default should be to refuse to lose data.

mv version: mv (GNU coreutils) 8.13
Checked on Ubuntu 12.04 (probably not relevant).

Regards,

J.F. Dock=E8s




Acknowledgement sent to jf@HIDDEN:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#13601; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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