Bug 2080478

Summary: Some file operations fail with gvfs fuse SMB mount
Product: Red Hat Enterprise Linux 8 Reporter: RW <rwbugz+rhbugzilla>
Component: gvfsAssignee: Ondrej Holy <oholy>
Status: CLOSED ERRATA QA Contact: Petr Schindler <pschindl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, jkoten, jwboyer, lilhuang, sbarcomb, tpelka, tpopela
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gvfs-1.36.2-13.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2093816 (view as bug list) Environment:
Last Closed: 2022-11-08 09:45:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2093816    

Description RW 2022-04-29 18:47:03 UTC
Description of problem:
Some file operations fail with gvfs fuse SMB mount. I believe this is fixed upstream in a later gvfs version (1.37.2). Applying the git diff from the fix commit as a patch to the source RPM and rebuilding fixes the issue. Is it possible to integrate the fix into the EL8 package?

Gnome bug report -> https://bugzilla.gnome.org/show_bug.cgi?id=795805
Fix commit upstream -> https://gitlab.gnome.org/GNOME/gvfs/-/commit/3f6f906c7c7b28dc30edb98200b6e13e1a513bb4

Version-Release number of selected component (if applicable): gvfs-smb 1.36.2-11 (latest seen in Centos Stream 8)

How reproducible: Simple to reproduce on the Linux side, but needs a Windows file server, with an account that has write access

Steps to Reproduce:
1. Have gvfs-smb and gvfs-fuse packages installed
2. Mount Windows file share (enter credentials as prompted) - gio mount smb://<hostname>/<share name>
3. Try to copy a file to the share using cp, via the fuse path in $XDG_RUNTIME_DIR/gvfs/

Actual results (error message varies depending on if target file exists or not, but both fail):
[~]$ cp /tmp/test.txt $XDG_RUNTIME_DIR/gvfs/smb-share\:server\=fileserver.ourdomain\,share\=users/myuser/
cp: cannot fstat '/run/user/1111/gvfs/smb-share:server=fileserver.ourdomain,share=users/myuser/test.txt': Invalid argument
[~]$ cp /tmp/test2.txt $XDG_RUNTIME_DIR/gvfs/smb-share\:server\=fileserver.ourdomain\,share\=users/myuser/
cp: cannot create regular file '/run/user/1111/gvfs/smb-share:server=fileserver.ourdomain,share=users/myuser/test2.txt': Invalid argument


Expected results: No error (file copy succeeds)


Additional info: strace shows this hitting EINVAL

Comment 3 Ondrej Holy 2022-06-02 10:00:19 UTC
*** Bug 2092205 has been marked as a duplicate of this bug. ***

Comment 8 Petr Schindler 2022-07-11 19:07:27 UTC
Bug is fixed in version gvfs-1.36.2-13.el8. No regression found.

Comment 10 errata-xmlrpc 2022-11-08 09:45:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (gvfs bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7587