Subject: bug#52122: closed (Re: bug#52122: mv: deletes src file on error)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 26 Nov 2021 18:19:01 +0000

Your bug report

#52122: mv: deletes src file on error

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].

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

Subject: Re: bug#52122: mv: deletes src file on error
From: Paul Eggert <[email-masked]>
To: Frank Busse <[email-masked]>, Chris Elvidge <[email-masked]>
Cc: [email-masked]
Date: Fri, 26 Nov 2021 10:18:44 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

On 11/26/21 04:23, Frank Busse wrote:
> I
> guess it was a hiccup somewhere else in the system, sorry.

Thanks for following up; closing the bug report.

Subject: mv: deletes src file on error
From: Frank Busse <[email-masked]>
To: [email-masked]
Date: Fri, 26 Nov 2021 11:07:09 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Given two files: an old version of "foo" on a mounted USB stick:

/mnt/dst/foo

and a new version of "foo" in /src/foo on the system's hard drive. When
I do:

sudo mv /src/foo /mnt/dst/foo

I get the following error:

mv: failed to preserve ownership for '/mnt/dst/foo': Operation not permitted

The error is fine but mv deletes /src/foo and keeps mnt/dst/foo,
meaning that the data of the new file is lost. Is this the intended
behaviour? I'm using Coreutils 9.0.

Kind regards,

Frank