Bug 1952714

Summary: various commands failing to access fuse.portal filesystems
Product: Red Hat Enterprise Linux 8 Reporter: Ryan Mullett <rmullett>
Component: coreutilsAssignee: Kamil Dudka <kdudka>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.4CC: dvolkov, fsumsal, kdudka, mkolbas, qguo
Target Milestone: betaKeywords: OtherQA, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: coreutils-8.30-10.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1969317 (view as bug list) Environment:
Last Closed: 2021-11-09 19:42:17 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: 1969317    
Bug Blocks:    

Description Ryan Mullett 2021-04-22 22:54:41 UTC
Description of problem:
fuse.portal is not marked as a dummy fs, so various utilities fail with EPERM when attempting to read them. 

How reproducible:
Always

Steps to reproduce error:
$ systemctl start --user xdg-document-portal   # Make sure xdg-document-portal is running.
# find /run/user/1000/doc -ignore_readdir_race -xdev -type f
find: ‘/run/user/1000/doc’: Permission denied

Temporary workaround:
$ systemctl mask --user xdg-document-portal

Actual results:
Permission denied

Expected results:
find, and other utilities should not attempt to access fuse.portal filesystems. 

Additional info:
Issue is not limited to find, but find is the specific example provided in this instance. Upstream discussions are more towards df, and the fix seems to be marking fuse.portal as squashfs

Several upstream discussions of this:

df (and other commands) fail on /root/.cache/doc · Issue #512 · flatpak/xdg-desktop-portal · GitHub
https://github.com/flatpak/xdg-desktop-portal/issues/512

mountlist.c: Define fuse.portal mounts as dummy by dbonner · Pull Request #11 · coreutils/gnulib · GitHub
https://github.com/coreutils/gnulib/pull/11

Suggested fix to mountlist.c: Define fuse.portal, devtmpfs and squashfs
https://lists.gnu.org/archive/html/bug-gnulib/2021-02/msg00053.html

Comment 1 Kamil Dudka 2021-04-23 08:57:27 UTC
Thank you for filing the bug!  This was previously reported on Fedora:

    bug #1913358

The fix has not yet been merged upstream though.  Would it be enough for RHEL-8 to put "fuse.portal" on the list of dummy file systems?

Comment 2 Ryan Mullett 2021-05-11 16:05:50 UTC
(In reply to Kamil Dudka from comment #1)
> Thank you for filing the bug!  This was previously reported on Fedora:
> 
>     bug #1913358
> 
> The fix has not yet been merged upstream though.  Would it be enough for
> RHEL-8 to put "fuse.portal" on the list of dummy file systems?

My understanding was that the proposed upstream fixes were going to take that approach, and that it did seem to resolve the issues in all utilities that were experiencing this issue where they attempted to access fuse.portal filesystems. Based on that, I believe it should be acceptable.

Comment 3 Kamil Dudka 2021-05-11 16:35:46 UTC
The proposed (but not yet applied) upstream patch adds "fuse.portal", "devtmpfs" and "squashfs" on the list of dummy file systems.  As I understand it, adding only "fuse.portal" on the list should fully resolve the issue that the customer is facing.  Could you please check with the customer whether it is really the case?

I can prepare a scratch build for testing purposes if needed.

We try to keep changes in minor RHEL updates as small as possible to lower the risk of breaking existing deployments of our customers.  Thanks for understanding!

Comment 4 Ryan Mullett 2021-05-11 16:44:55 UTC
(In reply to Kamil Dudka from comment #3)
> The proposed (but not yet applied) upstream patch adds "fuse.portal",
> "devtmpfs" and "squashfs" on the list of dummy file systems.  As I
> understand it, adding only "fuse.portal" on the list should fully resolve
> the issue that the customer is facing.  Could you please check with the
> customer whether it is really the case?
> 
> I can prepare a scratch build for testing purposes if needed.
> 
> We try to keep changes in minor RHEL updates as small as possible to lower
> the risk of breaking existing deployments of our customers.  Thanks for
> understanding!

Totally understand, I will confirm with them.

Comment 5 Denis Volkov 2021-05-13 10:14:40 UTC
@kdudka @rmullett customer confirmed that adding 'fuse.portal' should fix the issue and that they would be glad to have a test build

Comment 6 Kamil Dudka 2021-05-13 12:18:44 UTC
Thanks for confirmation!  I have prepared an unsupported copr for *testing* purposes only:

    https://copr.fedorainfracloud.org/coprs/kdudka/coreutils-rhbz1952714/

Comment 7 Kamil Dudka 2021-05-19 10:46:42 UTC
Denis, has the test build been passed to the customer?

We are now evaluating this bug for inclusion in the rhel-8.5.0 update.

Comment 8 Radka Brychtova 2021-05-19 11:03:40 UTC
Hi,
setting qa_ack+ for RHEL-8.5
It would be nice if Ryan will help us with testing, because we could have problem with HW.

Comment 9 Denis Volkov 2021-05-20 09:37:05 UTC
@kamil Sorry for delay with update. I sent the builds to customer, waiting for update from them

Comment 10 Kamil Dudka 2021-05-20 09:43:01 UTC
Thanks!

Comment 25 errata-xmlrpc 2021-11-09 19:42:17 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 (coreutils 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-2021:4418