Copy To Smb Share Fails With “invalid Argument” On CentOS 7

Home » CentOS » Copy To Smb Share Fails With “invalid Argument” On CentOS 7
CentOS No Comments

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@osl-97214 ~]$ dd if=/dev/zero of=tst.zero bse537 count=1
1+0 records in
1+0 records out
65537 bytes (66 kB) copied, 0.000919358 s, 71.3 MB/s
[toralf@osl-97214 ~]$ gvfs-copy tst.zero
“smb://pgs.com;toralf.lund@ourserver/theshare/”
Error copying file tst.zero: Invalid argument
[toralf@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