coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coretutils package produces the ownership issue during "mv" command


From: Koteswararao Nelakurthi
Subject: Re: coretutils package produces the ownership issue during "mv" command execution.
Date: Tue, 14 May 2013 14:45:23 +0530

Dear Padraig Brady,

Thank you very much for your response.
I attached the strace log for "mv" command.

Regards
koteswararao


On Tue, May 14, 2013 at 2:31 PM, Pádraig Brady <address@hidden> wrote:
On 05/14/2013 06:31 AM, Koteswararao Nelakurthi wrote:
> Dear All,
>
> I am trying to do mv(move) operation on
> Embedded LInux board (x86 target).
> THe mv command is executed to
> copy a symbolic link file from
> one disk drive partition to
> other partition on Embedded linux target
> board.
> But i observed below issue during mv command
> execution. Even below message is observed,
> the file is copied to other partition successfully.
> i am using coreutils-8.5-r6.0.7 package.
>
> {{{
> root@x86-generic-64:/mnt/sda3# ls -l aaa bbb
> -rw-r--r-- 1 root root 0 May  9 13:02 aaa
> lrwxrwxrwx 1 root root 3 May 11 09:08 bbb -> aaa
> root@x86-generic-64:/mnt/sda3# mv bbb /mnt/sda4/
> mv: failed to preserve ownership for /mnt/sda4/bbb: Function not implemented
> }}}
>
> IF if use coreutils-8.5-r6.0.6 , then above issue
> is not observed
>
> Any inputs about the changes done in coreutils package
>
> that may be producing the above issue?

Please use address@hidden in future,
so that others may help (in future).

So coreutils-8.5-r6.0.6 works and coreutils-8.5-r6.0.7 doesn't?
That suggests a downstream change that the coreutils project
wasn't involved in?

Anyway using strace you can see what operations mv is trying on the dest:

symlink("aaa", "/mnt/sda4/bbb")          = 0
lchown("/mnt/sda4/bbb", 500, 500)        = 0
utimensat(AT_FDCWD, "/mnt/sda4/bbb", ..., AT_SYMLINK_NOFOLLOW) = 0

So lchown is returning ENOSYS for your file system,
which is fair enough as it probably doesn't support ownerships.
In the source for mv there is chown_failure_ok() which
only hides EPERM||EINVAL errors for non root users.
All others are warned about.

You might be wondering what significance the owner of
a symlink has, but since it's supported, some significance
can be associated. For example apache can be configured to
follow symlinks only if the owner of the link matches the
owner of the destination.

thanks,
Pádraig.

Attachment: strace.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]