Mark Dorset
2004-Feb-03 06:48 UTC
[Samba] Problems copying some files from windows to linux
Hi, This might not be entirely samba server related, but the problem I am experiencing is affecting a planned implementation of a new Samba Server, and from the smbmount man page, it appears that this is the recommended list to reqest help - so hopefully someone might be able to assist :-). I am running a Debian Linux machine (kernel 2.6.0) with Samba 3.0.1 which will soon be replacing an existing Windows PDC here. We are looking at transferring files from the existing Windows server to the linux box, but have a problem with some of the files. For example, file names with apostrophes (i.e., "company's.exe"), and question marks (i.e., "Help?.doc") do not seem to be manageable, while everything other file in a given subdirectory will be fine. We're pretty much just mounting the share on the windows box as a smbfs off a local mount point, and we only need this temporarily as the windows server will be decommissioned once the files are across. The fstab entry; =-=-//windowsserver/D$ /mnt/windowsserver/D smbfs defaults,rw,username=validuser,password=validpass =-=- The file can be seen by doing a wildcard ls; =-=-# ls -l /mnt/windowsserver/D/fred/Eudora/Attach/c* -rwxr--r-- 1 root root 24576 Nov 14 2001 /mnt/windowsserver/D/fred/Eudora/Attach/company's.exe -rwxr--r-- 1 root root 162816 Aug 30 2001 /mnt/windowsserver/D/fred/Eudora/Attach/corporate_plan.doc =-=- Trying to access the file without the apostrophe works fine, but the one with the apostrophe doesn't; =-=-# ls -l /mnt/windowsserver/D/fred/Eudora/Attach/corporate_plan.doc -rwxr--r-- 1 root root 162816 Aug 30 2001 /mnt/windowsserver/D/fred/Eudora/Attach/corporate_plan.doc # ls -l /mnt/windowsserver/D/fred/Eudora/Attach/company\'s.exe ls: /mnt/windowsserver/D/fred/Eudora/Attach/company's.exe: No such file or directory # ls -l "/mnt/windowsserver/D/fred/Eudora/Attach/company\'s.exe" ls: /mnt/windowsserver/D/fred/Eudora/Attach/company\'s.exe: No such file or directory =-=- To try and resolve the problem, I've done all the following without achieving success; - tried all kind of varieties of backslashes, quotes, etc to try and get the system to see the file - searched the samba archives as well as plenty of google searches for possible solutions - messed around with the codepage and iocharset options for smbmount Strangely, if I create a new file within the mounted windows file system tree with an apostrophe, it is recognised and accepted; =-=-# touch /mnt/windowsserver/D/fred/Eudora/Attach/test\'ing.exe # ls -l /mnt/windowsserver/D/fred/Eudora/Attach/test\'ing.exe -rwxr--r-- 1 root root 0 Feb 3 16:35 /mnt/windowsserver/D/fred/Eudora/Attach/test'ing.exe =-=- If anyone has any suggestions as to how I can further pursue a resolution to this behaviour, I would be most appreciative! thanks in advance, Mark -- Mark Dorset IT Department, Trinity College p:03 9348 7465 m:0412 28 3311 Royal Parade, Parkville VIC 3052 mdorset@trinity.unimelb.edu.au http://www.trinity.unimelb.edu.au
Mark Dorset
2004-Feb-03 23:11 UTC
[Samba] Problems copying some files from windows to linux
Hi TeeCee, Thanks for taking the time to send an email.> aposrophes and question marks ARE NOT fine for filenames!!! > For example the "?" and "*" cannot be used on the most systems because > they are wildcards so You cannot point a single file with them! :PI'll be sure to tell anyone using the internet that might send such a file to someone here as a file attachment then so they don't do it again... :-\> The other ones are working on *nix in most cases, BUT on Win systems > not. You cannot use \/:*?"<>| on Windows systems. Read some filenaming > manual :)Unfortunately this doesn't change the fact that the Windows Server is holding files with punctuation marks like "?" and "'", and that I need to figure out a way to get them to copy over... Interestingly, I've noticed that there's a second file with an apostrophe named "john's gift.doc" in the example mounted directory I've been using (the one that also contains "company's.exe", but it is entirely manageable whereas "company's.exe" still is not.... Permissions are the same, and I can do an ls <file>, file <file>, etc without problems on that one... Very strange I think. regards, Mark -- Mark Dorset IT Department, Trinity College p:03 9348 7465 m:0412 28 3311 Royal Parade, Parkville VIC 3052 mdorset@trinity.unimelb.edu.au http://www.trinity.unimelb.edu.au