[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mv --no-preserve-ownership
From: |
Pádraig Brady |
Subject: |
Re: mv --no-preserve-ownership |
Date: |
Thu, 30 Apr 2015 15:30:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 30/04/15 13:02, sa wrote:
> Dear coreutils developers,
>
>
> it's still common today when you can copy files somewhere but subsequent
> chown() on them returns EACCES:
>
> NFS without strict uid/gid mapping,
> CIFS with broken Unix Extensions - nowaday NAS devices,
> less common filesystems like sshfs.
>
> When you move files to there, intuitively the operation is plain move,
> but mv should be avoided because of error messages (as many as file number):
>
> mv: failed to preserve ownership
>
> Sometimes these error messages probably hide really important error
> messages and hence force me to double-check: if files were actually
> copied to destination and were actually deleted from source.
> During years, I'm inventing, improving and distributing lines like "cp
> &&rm", having developed fear for using mv.
>
> What do coreutils developers think about this?
> Is there hope for accepting --no-preserve-ownership patch to mv?
Maybe, but the `cp ... && rm` combo give more control
and isn't too awkward for this. Also it doesn't have
a functional disadvantage of using extra space, as
generally this is an issue between separate file systems.
Also it has a functional advantage of being an atomic
operation, not deleting any files unless all were copied.
thanks,
Pádraig.