Discussion:
mv: 0653-404 /source_dir/file: Unable to duplicate owner and mode after move
(too old to reply)
g***@laposte.net
20 years ago
Permalink
Hi,

I am trying to do the following operation under the 'admd2a01' user :

admd2a01# mv /source_dir/file /dest_dir

but I have the following warning message :

mv: 0653-404 /source_dir/file: Unable to duplicate owner and mode after
move

The rights/ownerships of /source_dir, file and /dest_dir are :

* /source_dir :
drwxrwxr-x 2 admd2a01 pscrm 1536 Sep 06 16:33 .

* /dest_dir :
drwxrwsr-x 2 admd2a01 pscrm 512 Sep 06 16:33 .

* file :
-rw-r----- 1 cft230 cft 3210647 Sep 05 00:01 file

How could I avoid this warning ?

Thanks in advance for your help.

Gildas.
steven_nospam at Yahoo! Canada
20 years ago
Permalink
The source file has the following ownerships:

Owner: cft230
Group: cft

The destination directory has these ownerships:

Owner: admd2a01
Group: pscrm

The error is a warning to let you know that it is (for security
reasons) unable to put the file into a directory owned by someone else.


You should be able to avoid this error by making user "cft230" a member
of group "pscrm". If that does not solve the issue, I suggest reviewing
what AIX sets the file's permissions/ownerships to AFTER it has been
moved. That may give you a clue about what part of the move it is
complaining about.

HTH
Steve
g***@laposte.net
20 years ago
Permalink
Hi Steven and thanks a lot for your answer. In fact, the solution you
have given doesn't solve the problem. I can see that the file in
/source_dir is :

-rw-r----- 1 cft230 cft 946 Sep 07 00:01
file

and the file moved in /dest_dir is :

-rw-r----- 1 admd2a01 pscrm 946 Sep 07 00:01
file

Any other idea ?

Thanks in advance.

Gildas.
Villy Kruse
20 years ago
Permalink
On 7 Sep 2005 03:57:36 -0700,
Post by g***@laposte.net
Hi Steven and thanks a lot for your answer. In fact, the solution you
have given doesn't solve the problem. I can see that the file in
-rw-r----- 1 cft230 cft 946 Sep 07 00:01
file
-rw-r----- 1 admd2a01 pscrm 946 Sep 07 00:01
file
Any other idea ?
If source and destination is in the same file system then mv will be a
simple rename which doesn't do anything to the owner and mode of the file.
However, if the file is moved to a different file system then mv first
copies the file and then deletes the original. As only superuser is
allowed to modfy the file ownership the destination file will become
owned by whoever moved it, and that is what the warning is about.

Villy
g***@laposte.net
20 years ago
Permalink
OK, thanks a lot for the information. How could I do for allowing user
'admd2a01' to move the file owned by 'cft230' from /source_dir to
/dest_dir without that warning ?

Thanks in advance for your help.

GP

Continue reading on narkive:
Search results for 'mv: 0653-404 /source_dir/file: Unable to duplicate owner and mode after move' (Questions and Answers)
9
replies
How do you execute a file in Unix? I was told #!/bin/sh, but where is this used.?
started 18 years ago
programming & design
Loading...