[linux-cifs-client] cp -p localfile to a winnt, w2k0,
winxp server - and legacy servers like win98SE
and OS/2 - does _not_ succeed. To get that tracked now,
i'll open a samba bugzilla entry, too
Günter Kukkukk
linux at kukkukk.com
Wed Jul 9 03:55:34 GMT 2008
I post that here - so it's not going to be forgotten.
Again and again there are posts to many mailing lists,
that cifs vfs is handling timestamps improperly.
Regarding legacy servers, special copy operations just fail.
(the todays smbfs vs. cifs legacy problem)
Test environment:
- latest git cifs vfs is mounted against
- winNT
- WinXP
- OS/2
- Win98SE
Unfortunately, this one cannot be simply explained in 3 words ...
----------------------------
To make it as clear as possible - the mount commands:
*****************************************************
WinNT server:
=============
mount -t cifs //wrkgk/test /mnt/winnt -o cred=/root/sec/sec_gk,dir_mode=0775,file_mode=0764,uid=gk,gid=users
WinXP server:
=============
mount -t cifs //cboyer/gk /mnt/winxp -o cred=/root/sec/sec_gk,dir_mode=0775,file_mode=0764,uid=gk,gid=users
OS/2 server:
============
mount -t cifs //server01/CIFS /mnt/server -o cred=/root/sec/sec_gk,sec=lanman,servern=SERVER01,port=139,dir_mode=0775,file_mode=0764,uid=gk,gid=users
Win98SE:
========
mount -t cifs //win98/CIFS /mnt/win9x -o cred=/root/sec/sec_gk,servern=WIN98,dir_mode=0775,file_mode=0764,uid=gk,gid=users
------------------------------------------------------
The results of "cp -p local_file /mnt/some_server":
***************************************************
NOTE:
cp -p src dst
the '-p' option should preserve time stamps - at least the
last modification time!
WinNT:
======
gk at linux700:~/cifstest> stat dummy.tst && cp -p dummy.tst /mnt/winnt/ && sleep 1 && stat /mnt/winnt/dummy.tst
File: `dummy.tst'
Size: 51078 Blocks: 104 IO Block: 4096 regular file
Device: 306h/774d Inode: 1054939 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ gk) Gid: ( 100/ users)
Access: 2008-07-09 04:32:26.000000000 +0200
Modify: 2007-05-07 21:52:40.000000000 +0200
Change: 2008-07-09 04:32:24.000000000 +0200
File: `/mnt/winnt/dummy.tst'
Size: 51078 Blocks: 104 IO Block: 16384 regular file
Device: 10h/16d Inode: 11749 Links: 1
Access: (0764/-rwxrw-r--) Uid: ( 1000/ gk) Gid: ( 100/ users)
Access: 2008-07-09 04:35:06.854217400 +0200 !!!!!!!!!!!!!!!!!!!!!
Modify: 2008-07-09 04:35:06.794122600 +0200 !!!!!!!!!!!!!!!!!!!!!
Change: 2008-07-09 04:35:06.794122600 +0200 !!!!!!!!!!!!!!!!!!!!!
WinXP:
======
gk at linux700:~/cifstest> stat dummy.tst && cp -p dummy.tst /mnt/winxp/ && sleep 1 && stat /mnt/winxp/dummy.tst
File: `dummy.tst'
Size: 51078 Blocks: 104 IO Block: 4096 regular file
Device: 306h/774d Inode: 1054939 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ gk) Gid: ( 100/ users)
Access: 2008-07-09 04:32:24.000000000 +0200 !!!!!!!!!!!!!!!!!!!!!!!!
Modify: 2007-05-07 21:52:40.000000000 +0200 !!!!!!!!!!!!!!!!!!!!!!!!
Change: 2008-07-09 04:32:24.000000000 +0200 !!!!!!!!!!!!!!!!!!!!!!!!
File: `/mnt/winxp/dummy.tst'
Size: 51078 Blocks: 104 IO Block: 16384 regular file
Device: 11h/17d Inode: 11484 Links: 1
Access: (0764/-rwxrw-r--) Uid: ( 1000/ gk) Gid: ( 100/ users)
Access: 2008-07-09 04:31:31.012852800 +0200
Modify: 2008-07-09 04:31:31.012852800 +0200
Change: 2008-07-09 04:31:31.012852800 +0200
OS/2:
=====
gk at linux700:~/cifstest> stat dummy.tst && cp -p dummy.tst /mnt/server/ && sleep 1 && stat /mnt/server/dummy.tst
File: `dummy.tst'
Size: 51078 Blocks: 104 IO Block: 4096 regular file
Device: 306h/774d Inode: 1054939 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ gk) Gid: ( 100/ users)
Access: 2008-07-09 04:46:16.000000000 +0200
Modify: 2007-05-07 21:52:40.000000000 +0200
Change: 2008-07-09 04:32:24.000000000 +0200
cp: preserving times for `/mnt/server/dummy.tst': Invalid argument
Win98SE:
========
gk at linux700:~/cifstest> stat dummy.tst && cp -p dummy.tst /mnt/win9x/ && sleep 1 && stat /mnt/win9x/dummy.tst
File: `dummy.tst'
Size: 51078 Blocks: 104 IO Block: 4096 regular file
Device: 306h/774d Inode: 1054939 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ gk) Gid: ( 100/ users)
Access: 2008-07-09 04:36:04.000000000 +0200
Modify: 2007-05-07 21:52:40.000000000 +0200
Change: 2008-07-09 04:32:24.000000000 +0200
cp: preserving times for `/mnt/win9x/dummy.tst': Invalid argument
-----------------------------------------------------------------
Conclusion:
===========
WinNT and WinXP just _silently_ FAIL!
OS/2 and Win98SE just fail with an error msg!
All this is "a known cifs failure" for weeks now - Jeff Layton
has prepared a (large) patch to "cleanup the cifs_setattr()"
stuff - and I'm waiting to post more legacy functionality.
... but nothing happens ...
A really sad situation, when realizing that even the samba
smbfs helpers smbmount, smbmnt and smbumount have now been
removed in 3.2.x.
Cheers, Günter
More information about the linux-cifs-client
mailing list