weird behaviour of mv between filesystems

CaT (cat@zip.com.au)
Sat, 20 Feb 1999 16:27:50 +1100 (EST)


Howdy. I'm not sure if this is a kernel issue. If not i'd be greatful
if you could point me at the right place.

I've had weird behaviour with mv for ages now but have only just gotten
around to reporting it (always forgot :/).

Anyways. in todays example I was moving the following files:

1020.root@kinder:/usr/local/src/XFree>> ll
total 46593
1 drwx--S--- 2 root local 1024 Feb 13 17:56 .
6 drwxr-sr-x 42 marvin local 6144 Feb 20 15:42 ..
142 -rwx------ 1 root local 143859 Feb 13 17:41 3.3.3-3.3.3.1.diff.bz2
188 -rwx------ 1 root local 191194 Feb 13 17:41 X333contrib.tar.bz2
6677 -rwx------ 1 root local 6808966 Feb 13 17:42 X333servonly.tar.bz2
12853 -rwx------ 1 root local 13108804 Feb 13 17:42 X333src-1.tar.bz2
11425 -rwx------ 1 root local 11651802 Feb 13 17:42 X333src-2.tar.bz2
12493 -rwx------ 1 root local 12741535 Feb 13 17:43 X333src-3.tar.bz2
1155 -rwx------ 1 root local 1176335 Feb 13 17:43 X33test.tar.bz2
1 -rwx------ 1 root local 942 Feb 13 17:43 doctools-1.0-1.0.1.diff.bz2
943 -rwx------ 1 root local 960442 Feb 13 17:43 doctools-1.0.tar.bz2
709 -rwx------ 1 root local 721894 Feb 13 17:43 utils-1.0.0.tar.bz2

to my zip drive:

1021.root@kinder:/usr/local/src/XFree>> ll /mars/zip/XFree/
total 18
2 drwxr-x--- 2 damien spawn 2048 Feb 20 16:18 .
16 drwxr-x--- 7 damien spawn 16384 Jan 1 1970 ..

as root and the following happened:

1019.root@kinder:/usr/local/src/XFree>> mv * /mars/zip/XFree/
mv: /mars/zip/XFree/3.3.3-3.3.3.1.diff.bz2: Operation not permitted
mv: /mars/zip/XFree/X333contrib.tar.bz2: Operation not permitted
mv: /mars/zip/XFree/X333servonly.tar.bz2: Operation not permitted
mv: /mars/zip/XFree/X333src-1.tar.bz2: Operation not permitted
mv: /mars/zip/XFree/X333src-2.tar.bz2: Operation not permitted
mv: /mars/zip/XFree/X333src-3.tar.bz2: Operation not permitted
mv: /mars/zip/XFree/X33test.tar.bz2: Operation not permitted
mv: /mars/zip/XFree/doctools-1.0-1.0.1.diff.bz2: Operation not permitted
mv: /mars/zip/XFree/doctools-1.0.tar.bz2: Operation not permitted
mv: /mars/zip/XFree/utils-1.0.0.tar.bz2: Operation not permitted

The files wind up getting copied instead of getting moved across (ie
copied and then deleted). this only seems to happen when the source
is owned by someone other then the owner of the destination.

Eg:

1029.root@kinder:/usr/local/src/XFree>> >fishy
1030.root@kinder:/usr/local/src/XFree>> chown damien:spawn fishy
1031.root@kinder:/usr/local/src/XFree>> mv fishy /mars/zip
1032.root@kinder:/usr/local/src/XFree>> ll fishy
ls: fishy: No such file or directory

1033.root@kinder:/usr/local/src/XFree>> ll /mars/zip/fishy
0 -rwxr-x--- 1 damien spawn 0 Feb 20 16:25 /mars/zip/fishy

As can be seen, that worked.

Is this a problem with something weird in the filesystems themselves or
is there something plain wrong with mv?

Linux kinder 2.2.2pre5 #1 Sat Feb 20 02:49:59 EST 1999 i686 unknown
glibc 2.0.112
mv (GNU fileutils) 3.16

-- 
CaT (cat@zip.net.au)                       URL: http://www.zip.com.au/dev/null

An electricity provider of New Hampshire, US has advised it's customers that in the event of a power failure they can log on to its website for more information... - Paraphrased from the New Scientist, Feb 6, 1999

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/