[Samba] mv renames the wrong file
Guillaume Boudreau
samba at pommepause.com
Thu Dec 10 12:13:42 MST 2009
Hi,
Using Samba 3.4.3 server on Ubuntu 9.10 (compiled myself, since Ubuntu came with Samba 3.4.0).
Sometimes, mv commands don't do what I asked for!
This morning, I was in my Videos share, in the "Movies/Baby Einstein Mozart/" directory.
(I have the share mounted locally in /mnt/samba/Videos, on the same machine where samba server runs on.)
I issued the following command:
mv 10BE_BABY_MOZART.avi ../../Soline/Baby\ Einstein/Baby\ Mozart.avi
Here's what extd_audit logged for that:
vfs_extd_audit: rename ./Movies -> Soline/Baby Einstein/Baby Mozart.avi
And it indeed did what the log says it did; it moved my complete Movies folder into a new folder named Soline/Baby Einstein/Baby Mozart.avi/
But that wasn't what I asked for!!
Maybe this is a bug in the CIFS library used in Ubuntu to mount shares?
I didn't hit this bug when renaming files on my shares using other computers; the only time I reproduced it (unintentionally) (and it happened 3-4 times in the last days) is when I used the mv command in the shares I mounted locally on the server.
I seem to remember that when it happened in the past, instead of renaming the file like I asked for, it moved the parent folder at the target location...
Example: cd dir1; mv filename1 ../dir2/filename2
Would result in dir1 being renamed dir2/filename2/
and it would still contain filename1.
Any pointers?
(Should I post in the Ubuntu forums instead of here?)
Thanks,
Guillaume Boudreau
PS I checked my history to make sure I did issue the correct command, in the right directory, and I did:
834 cd samba/
835 cd Videos/Movies
836 cd Baby\ Einstein\ \ \ Mozart/
837 ls -l
838 mv 10BE_BABY_MOZART.avi ../../Soline/Baby\ Einstein/Baby\ Mozart.avi
More information about the samba
mailing list