Cannot copy file using 'cp' on a gvfs mount

Bug #1773114 reported by Roland65
50
This bug affects 11 people
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Confirmed
High
Unassigned

Bug Description

On Ubuntu 18.04, I can't anymore copy a file using the 'cp' command on a gvfs smb mount.

For example, If I try to copy the file test.odp on a SMB shared folder, like this:

cp -v test.odp /run/user/1000/gvfs/smb-share:domain=XXXXX,server=xxxxx,share=xxx,user=xxxxx/<some folder>

I get the following error:

cp: cannot fstat '/run/user/1000/gvfs/smb-share:domain=XXXXX,server=xxxxx,share=xxx,user=xxxxx/<some folder>/test.odp': Invalid argument

A file 'test.odp' is created, but with size 0.

I can delete any file on the shared folder using the 'rm' command.

If I copy the file using the command 'gio copy', then it works as expected.

This used to work in Ubuntu 16.04.

Of course, I don't know if the problem is in the gvfs package or in some underlying component...

System: Ubuntu 18.04 LTS (Bionic Beaver) 64-bit
Kernel: 4.15.0-22-generic x86_64
Package: gvfs 1.36.1-0ubuntu1

Roland65 (roland65)
description: updated
Roland65 (roland65)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gvfs (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could be the same as https://bugzilla.gnome.org/show_bug.cgi?id=795805, is that a SMB2 mount?

Changed in gvfs (Ubuntu):
importance: Undecided → High
Revision history for this message
Roland65 (roland65) wrote :

How can I know if the protocol is SMB2 or not?

Revision history for this message
Joe Schmoe (muckedymuck) wrote :

Don't know if it the same as https://bugzilla.gnome.org/show_bug.cgi?id=795805, or whether I'm even experiencing the same bug, but in my case small files copy fine and large files fail with the invalid argument error all in Nautilus. The bug mentioned states that files copy in Nautilus. It is unclear what size of file was used by the reporter in that bug report.

Revision history for this message
Erik W. Rasmussen (ewrdk) wrote :

This error persists in 18.04.3, gvfs version: 1.36.1-0ubuntu1.3.3
I tried to use gcp instead of cp but the result is the same, so this is an gvfs error.

But actually most of the files are copied (both using cp or gcp). So for example an gz-file is copied and it is possible to unpack it, but zgrep returns "unexpected end of file".

Note: By using smbclient I can retrieve the files without errors.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you maybe report the issue upstream on https://gitlab.gnome.org/GNOME/gvfs/issues ?

Revision history for this message
boon (boon-9ft1s) wrote :

As of 18.04 and still as at 19.10, this is all over the place. Errors left, right and centre.

nautilus gives "Software caused connection abort" copying a file (but pressing F5 to refresh shows that the copy seemingly worked).

gedit fails intermittently with the same error (possibly only on larger files, 32KB? not that 32KB is large).

cp gives the error as reported initially above.

I was copying using cp from one gio mount (smb) to another (sftp). Even gio copy was not a workaround. The only viable workaround that I found was to gio copy from the smb location to ~ and then copy from ~ to the sftp location. I was lucky that the file was not very big.

(LibreOffice has its own problems with this setup.)

Virtualisation of file systems is good functionality and I use it a lot but from 18.04 until now, taking the system as a whole, it has been badly broken.

Revision history for this message
boon (boon-9ft1s) wrote :

>Could you maybe report the issue upstream

Done.

Revision history for this message
isync (o-zucker) wrote :

Ubuntu 18.04.3 LTS here.
Tried to cp a file from local storage to a GVFS mounted Android Phone.

copy /home/user/example.file /run/user/1000/gvfs/mtp\:host\=%5Busb%3A001%2C004%5D/Phone/SomeDir/

Results in error: operation not supported.
Browsing the dir tree via CLI was working , though.
Via GUI in nautilus is working.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.