Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2092205

Summary: cp command failed with "Invalid argument" error on a gvfsd-fuse mount
Product: Red Hat Enterprise Linux 8 Reporter: Lili Huang <lilhuang>
Component: gvfsAssignee: Ondrej Holy <oholy>
Status: CLOSED DUPLICATE QA Contact: Petr Schindler <pschindl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.6CC: tpelka
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-02 10:00:19 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:

Description Lili Huang 2022-06-01 05:36:34 UTC
Description of problem:

on a gvfsd-fuse mount, the cp command fails with "Invalid argument" error.

gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

$ ps -aux | grep gvfs
hll        36870  0.0  0.6 620584 12712 ?        Ssl  01:04   0:00 /usr/libexec/gvfs-udisks2-volume-monitor
hll        36878  0.0  0.5 510504 10376 ?        Ssl  01:04   0:00 /usr/libexec/gvfs-mtp-volume-monitor
hll        36882  0.0  0.4 523208  9000 ?        Ssl  01:04   0:00 /usr/libexec/gvfs-gphoto2-volume-monitor
hll        36886  0.0  0.4 508240  8972 ?        Ssl  01:04   0:00 /usr/libexec/gvfs-goa-volume-monitor
hll        36897  0.0  0.4 591220  8608 ?        Ssl  01:04   0:00 /usr/libexec/gvfs-afc-volume-monitor
hll        37557  0.0  0.4 436760  8716 ?        Ssl  01:05   0:00 /usr/libexec/gvfsd-metadata
hll        37696  0.0  0.5 522816  9732 ?        Ssl  01:06   0:00 /usr/libexec/gvfsd
hll        37701  0.0  0.4 593072  8740 ?        Sl   01:06   0:00 /usr/libexec/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
hll        37710  0.0  0.5 674948 10008 ?        Sl   01:06   0:00 /usr/libexec/gvfsd-network --spawner :1.87 /org/gtk/gvfs/exec_spaw/0
hll        37723  0.0  0.5 615048 10336 ?        Sl   01:06   0:00 /usr/libexec/gvfsd-dnssd --spawner :1.87 /org/gtk/gvfs/exec_spaw/2
hll        37732  0.0  1.3 870708 24208 ?        SLl  01:07   0:00 /usr/libexec/gvfsd-smb --spawner :1.87 /org/gtk/gvfs/exec_spaw/3
hll        37976  0.0  0.0 221936  1192 pts/1    S+   01:13   0:00 grep --color=auto gvfs

$ pwd
/run/user/1000/gvfs/smb-share:server=192.168.122.130,share=users/Administrator/Documents/Share
$ ls
FromRHEL.txt  Newfile1.txt  newfile.txt  test.txt
$ rm -f newfile.txt Newfile1.txt 
$ ls
FromRHEL.txt  test.txt
$ cat FromRHEL.txt 
Hello World! !! !!! !!!!
Hello ab cb
$ cp FromRHEL.txt newfile.txt
cp: cannot create regular file 'newfile.txt': Invalid argument
$ ls
FromRHEL.txt  newfile.txt  test.txt
$ cat newfile.txt
$ touch new.txt
$ ls
FromRHEL.txt  Newfile.txt  new.txt  test.txt



Version-Release number of selected component (if applicable):
gvfs-fuse-1.36.2-11.el8.x86_64
gvfs-1.36.2-11.el8.x86_64
gvfs-smb-1.36.2-11.el8.x86_64
kernel-4.18.0-372.9.1.el8.x86_64

PS:
mount.cifs has no same issue. copy or save files from gedit(gnome text editor) has no same issue.

How reproducible:
This issue can be reproduced on RHEL7 and RHEL8

Steps to Reproduce:
1. Login to GUI, open Files, then click "+ Other Locations", enter the Server address like smb://XXXX
2. Access the shared files under /run/user/UID/gvfs/smbXXX from terminal.
3. run cp command.

Actual results:
cp command failed with "cp: cannot create regular file 'newfile.txt': Invalid argument"

Expected results:
gvfsd-fuse should work as a regular filesystem. 

Additional info:
The impact is customer can't save files from a third-party application which use  the standard POSIX APIs rather then gio.

Comment 2 Ondrej Holy 2022-06-02 10:00:19 UTC
Thanks for the report. I am pretty sure this is a duplicate of Bug 2080478 which we are going to fix in 8.7.0.

*** This bug has been marked as a duplicate of bug 2080478 ***