`df` command throws error on /run/user/1000/doc/ folder
The issue has been reported to Flatpak team, see
https://github.com/flatpak/xdg-desktop-portal/issues/512
As far as I can tell this is a flatpak bug, see:
$ systemctl --user status xdg-document-portal.service
● xdg-document-portal.service - flatpak document portal service
Loaded: loaded (/usr/lib/systemd/user/xdg-document-portal.service; static; vendor preset: disabled)
Active: active (running) since Thu 2020-06-04 11:44:00 IDT; 13min ago
Main PID: 19879 (xdg-document-po)
Tasks: 7 (limit: 16579)
Memory: 2.7M
CPU: 20ms
CGroup: /user.slice/user-1000.slice/[email protected]/xdg-document-portal.service
├─19879 /usr/libexec/xdg-document-portal
└─19887 fusermount -o rw,nosuid,nodev,fsname=portal,auto_unmount,subtype=portal -- /run/user/1000/doc
$ df -h > /dev/null
df: /run/user/1000/doc: Operation not permitted
$ systemctl --user stop xdg-document-portal.service
$ df -h > /dev/null
$
So flatpak fusermounts to allow exporting files to sandboxed applications: Flatpak Command Reference - Flatpak documentation
On my machine, which doesn't need any of these services, I did not have flatpak installed, but the problem could be solved by doing sudo apt remove xdg-desktop-portal
and rebooting.
This is regarded as a bug in gnulib, which has been fixed in this commit (June 2021). Referenced discussions:
- https://lists.gnu.org/archive/html/bug-gnulib/2021-02/msg00053.html
- https://bugzilla.redhat.com/show_bug.cgi?id=1913358
- https://bugs.launchpad.net/ubuntu/+source/xdg-desktop-portal/+bug/1905623