I am wondering whether anyone else has run into this issue, or if I've discovered a new bug.
Since upgrading from 16.04 to 18.04 several applications are unable to write to a Windows share. Nautilus is fully functional, i.e - clicking on a file opens it with the default application, files can be copied, moved, deleted with no errors. It is only when an application tries to save a file back to the share that it just got it from or to another share that the error occurs. The end result is a saved file of 0 bytes (empty file). Note that if one is updating an existing file with the application the file is essentially destroyed. (Not good!) This does not affect all applications.
Tested Applications:
- Gedit - OK
- Libreoffice - error until package libreoffice-gnome installed. Now OK
- GIMP 2.10 - failed - see error below
- Okular 1.3.3 - failed - see error below
- GPicView 0.2.5-2 - failed - see error below
Errors occur whether the application is run from Nautilus or from a terminal (command line).
I do not believe that it is a security issue. ll
of the target folder shows me as owner with rwx
permissions. The behavior is the same whether I use the shared PC name (from /etc/hosts
) or IP address.
My system is:
- Ubuntu 18.04.1 LTS 64-bit
- Gnome 3.28.2
Shares were opened in Nautilus by clicking "Other Locations", then typing the URL in the "Connect to Server" dialog. This results in the creation of the appropriate folder in /run/user/1000/gvfs
.
The GIMP Error is:
Saving 'smb://winhome10-1/data/Home/USER/Testfile2.jpg' failed:
Could not open '/run/user/1000/gvfs/smb-share:server=winhome10-1,share=data/Home/USER/Testfile2.jpg' for writing: Invalid argument
The Okular Error is:
File could not be saved in 'file:///run/user/1000/gvfs/smb-share:server=192.168.2.166,share=data/Home/USER/Scratch/Testfile2.pdf'. Error: 'Could not write to /run/user/1000/gvfs/smb-share:server=192.168.2.166,share=data/Home/USER/Scratch/Testfile2.pdf.'. Try to save it to another location.
The GPicView Error is:
Failed to open '/run/user/1000/gvfs/smb-share:server=192.168.2.166,share=data/Home/USER/Scratch/Testfile2.jpg' for writing: Invalid argument
So, is this a bug or am I doing something wrong?
See below link to gvfsd.log. Comment lines (#..) have been added to identify events.
failed=1 (No such file or directory)
-like sentences, though the log doesn't dive into details on what file it is. Anyway, it's a bug. Try installing latest samba (e.g. I see there's a PPA), and see if it helps (hmm, latest samba is 4.9, but they have 4.8. Probably didn't update yet, Archlinux still has 4.8.5 either, marked as outdated. 4.8 is still more recent than yours though). If didn't help, report a bug.