[CentOS] Copy to smb share fails with "invalid argument" on CentOS 7

Toralf Lund

toralf.lund at pgs.com
Thu Oct 4 14:04:35 UTC 2018


Hi,

I've had problems copying files to Windows shares from my CentOS 7 
machine lately. I originally got this in the desktop file manager, but 
find that I can also reproduce using gvfs-copy. "cp" to the directory 
mounted by gvfs works just fine, on the other hand. Also, the problem 
does not occur with small files - I think anything below 64k is OK. The 
following command sequence should illustrate the problem (note that some 
of the names have been changed):

[toralf at osl-97214 ~]$ dd if=/dev/zero of=tst.zero bs=65537 count=1
1+0 records in
1+0 records out
65537 bytes (66 kB) copied, 0.000919358 s, 71.3 MB/s
[toralf at osl-97214 ~]$ gvfs-copy tst.zero 
"smb://pgs.com;toralf.lund@ourserver/theshare/"
Error copying file tst.zero: Invalid argument
[toralf at osl-97214 ~]$ cp tst.zero 
/run/user/1234/gvfs/smb-share:domain=pgs.com,server=ourserver,share=theshare,user=toralf.lund/

I actually get numerous references to similar issues when I search the 
web, including 
https://bugzilla.redhat.com/buglist.cgi?quicksearch=%22invalid%20argument%22&list_id=9500568 
- but they seem to indicate that the cause was a samba issue that was 
resolved some time in during version 3 release cycle, and I have 
samba-4.7.1-9. Also, I never actually had problems like this with samba 3.

Has anyone else seen this? Is there a way around it?

Thanks.

- Toralf




More information about the CentOS mailing list