Linux->Win7 file copy protocol error when filename has colon

Discussions related to using VirtualBox on Windows hosts.
Post Reply
dho
Posts: 2
Joined: 5. May 2015, 12:47

Linux->Win7 file copy protocol error when filename has colon

Post by dho »

Hi. Most file copy operations from my Debian Linux guest to a shared folder on a Windows 7 host work fine. If the filename contains a colon, however, the copy fails with a protocol error. Example:
dho: ~/Pictures$ ls -l
total 48
-rw-r--r-- 1 dho dho 47460 Apr 21 13:32 Screenshot from 2015-04-21 13:32:32.png
dho: ~/Pictures$ cp Screenshot\ from\ 2015-04-21\ 13\:32\:32.png /media/sf_loc/tmp/
cp: cannot create regular file `/media/sf_loc/tmp/Screenshot from 2015-04-21 13:32:32.png': Protocol error
dho: ~/Pictures$ cp Screenshot\ from\ 2015-04-21\ 13\:32\:32.png 133232.png
dho: ~/Pictures$ cp 133232.png /media/sf_loc/tmp/
dho: ~/Pictures$ cp Screenshot\ from\ 2015-04-21\ 13\:32\:32.png 13:32:32.png
dho: ~/Pictures$ cp '13:32:32.png' /media/sf_loc/tmp/
cp: cannot create regular file `/media/sf_loc/tmp/13:32:32.png': Protocol error
dho: ~/Pictures$ ls -l
total 144
-rw-r--r-- 1 dho dho 47460 May 5 12:09 13:32:32.png
-rw-r--r-- 1 dho dho 47460 May 5 12:08 133232.png
-rw-r--r-- 1 dho dho 47460 Apr 21 13:32 Screenshot from 2015-04-21 13:32:32.png
Nothing new appears in my guest log file when I do this. I have attached, however, my settings file. Thanks.
Attachments
debian760settings.txt
(4.19 KiB) Downloaded 2 times
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

Re: Linux->Win7 file copy protocol error when filename has c

Post by michaln »

Can you create/store a file called "Screenshot from 2015-04-21 13:32:32.png" on the host?
dho
Posts: 2
Joined: 5. May 2015, 12:47

Re: Linux->Win7 file copy protocol error when filename has c

Post by dho »

Duh! Believe it or not, I actually checked that first. I copy-pasted the filename from the Linux shell to the Windows host file explorer. And it appeared to work because I got no errors. What I didn't realize is that the paste operation stripped the colons from the filename, without telling me. It's only when I just now tried to type the filename by hand that Windows warned me that colons are not permitted. Excuse me for wasting your time! Cheers, D.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

Re: Linux->Win7 file copy protocol error when filename has c

Post by michaln »

No problem.

What you ran into is "irreconcilable differences" between Windows and Unix filename semantics... basically Windows is a lot more restrictive about what it allows in file names and what it does not. Apart from characters like colon, there's also case sensitivity (no way to represent 'Foo' and 'foo' as two separate files in the same directory on NTFS et al.). There's nothing much VirtualBox can do about that... and Microsoft can but probably won't do anything :)
Post Reply