Bug 1969317

Summary: various commands failing to access fuse.portal filesystems [rhel-9]
Product: Red Hat Enterprise Linux 9 Reporter: Kamil Dudka <kdudka>
Component: coreutilsAssignee: Kamil Dudka <kdudka>
Status: CLOSED CURRENTRELEASE QA Contact: Vojtech Eichler <veichler>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.0CC: fsumsal, kdudka, veichler
Target Milestone: betaKeywords: Triaged
Target Release: 9.0 Beta   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: coreutils-8.32-27.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1952714 Environment:
Last Closed: 2021-12-07 21:44:43 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: 1913358    
Bug Blocks: 1952714    

Description Kamil Dudka 2021-06-08 07:57:26 UTC
+++ This bug was initially created as a clone of Bug #1952714 +++

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

--- Additional comment from Kamil Dudka on 2021-04-23 10:57:27 CEST ---

Thank you for filing the bug!  This was previously reported on Fedora:

    bug #1913358

Comment 1 Kamil Dudka 2021-06-09 08:53:51 UTC
Reproducer:

# yum install -y xdg-desktop-portal
# systemctl --user start xdg-document-portal.service
# mount | grep portal
portal on /run/user/0/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=0,group_id=0)

# df > /dev/null
df: /run/user/0/doc: Operation not permitted