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 1813727 - Files copied from NFS4 to Desktop can't be opened
Summary: Files copied from NFS4 to Desktop can't be opened
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: gnome-shell-extensions
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Florian Müllner
QA Contact: Martin Krajnak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-15 20:59 UTC by Ricardo Duarte
Modified: 2021-11-10 07:22 UTC (History)
5 users (show)

Fixed In Version: gnome-shell-extensions-3.32.1-16.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:33:50 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4381 0 None None None 2021-11-09 19:34:02 UTC

Description Ricardo Duarte 2020-03-15 20:59:02 UTC
Description of problem:
Files copied from nfsv4 shares do not open, when copied to the desktop

Version-Release number of selected component (if applicable):

Gnome 3.32.2

How reproducible:
Always

Steps to Reproduce:
- An NFS4 folder mounted anywhere in the system
- Copy a file from nfs4 to gnome (classic) desktop
- When I try to open the file by double-click at the desktop, nothing seems to happen. A strange file named "from" is created at the home folder.
- Righ Clicking  and selecting "Open With" does work.

Comment 1 Ricardo Duarte 2020-03-15 21:01:39 UTC
If I copy the same file from CIFS, it opens fine.
I inspected all the file permissions and md5 and the files (copied from cifs; copied from nfsv4) are exactly the same.
But the one copied from nfsv4 will not open.
The only thing I see, error wise, is some fs-cache messages at the text console.
No fscache, fsc or cachefiles are in use.

Comment 2 Ricardo Duarte 2020-03-15 21:18:16 UTC
The home folder itself is stored on a local ext4 disk.
Rebooting the server does not fix the issue. User is still unable to access the files by double click on the desktop.
Happens with selinux enabled or disabled.
Same setup works fine on RHEL 7.7.

A small difference between the files can be seen by right click > properties > permissions. The file from NFSv4 has a "-" at "Allow executing file as program". 
But cleaning the check box does not fix the issue.

Comment 3 Ricardo Duarte 2020-03-15 21:23:41 UTC
Also see sometimes a "Execution of command full_path_to_the_file_at_desktop", "command not found notification".

Comment 5 Matthias Clasen 2020-10-06 20:28:34 UTC
This is misfiled against gnome-desktop3. I'll assume that you copied the file in nautilus, and move the bug there.

Comment 6 Ondrej Holy 2020-10-07 06:27:32 UTC
The files on your server are probably marked as executable for some reason. NFS is aware of UNIX permissions, thus the copied files are also marked as executable. CIFS doesn't have enabled UNIX Extensions by default, thus the exectuable permissions are not copied. Consequenlty, the desktop-icons extensions tries to execute the file instead of opening: https://gitlab.gnome.org/World/ShellExtensions/desktop-icons/-/issues/144, which is fixed by  https://gitlab.gnome.org/World/ShellExtensions/desktop-icons/-/merge_requests/147. So changing component to gnome-shell-extensions as it would be probably nice to backport the mentioned fix, however, the root of the problem seems to be simply the wrong permissions...

Comment 8 Martin Krajnak 2021-06-02 11:38:47 UTC
gnome-shell-extension-desktop-icons-3.32.1-18.el8.noarch

Reproducer:
1. Login to gnome-classic, mount nfs4 storage
2. copy text file to ~/Desktop from the nfs storage via terminal
3. open nautilus, navigate to nfs4 share, copy a .png image to ~/Desktop folder

Result:
 Both files have desktop icons and can be opened in gedit/eog by clicking on their icons.

However after reading Comment 6, I tried the same reproducer but before copying files I marked them as executable:
 - the .png file was opened in eog as expected
 - nothing happens after clicking on .txt file

I understand that based on permissions the extension tries to execute the file but I just want to be sure before I verify this,
so is this expected ?

Comment 9 Florian Müllner 2021-06-02 16:59:44 UTC
(In reply to Martin Krajnak from comment #8)
> gnome-shell-extension-desktop-icons-3.32.1-18.el8.noarch
> 
> However after reading Comment 6, I tried the same reproducer but before
> copying files I marked them as executable:
>  - the .png file was opened in eog as expected
>  - nothing happens after clicking on .txt file
> 
> I understand that based on permissions the extension tries to execute the
> file

That was the case before the fix.

With the fix, the extension *also* checks whether the content type (based on the file extension) can be executable. That's why the image now opens as expected, but unfortunately text files *may* be executable (as documented in https://gitlab.gnome.org/GNOME/glib/-/blob/master/gio/gcontenttype.c#L648).

I could add another special-case to not execute executable files of type "text/plain", but that would mean that scripts without .sh suffix aren't executed anymore.

I suspect that that's a more common case than a wrongly set executable bit, so I'm a bit wary of diverging from upstream here.

Comment 14 errata-xmlrpc 2021-11-09 19:33:50 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 (Moderate: GNOME security, 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/RHSA-2021:4381


Note You need to log in before you can comment on or make changes to this bug.