Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Can not access file from protal filechooser if XDG_RUNTIME_DIR is in /tmp #5573

Open
4 tasks done
cedk opened this issue Nov 1, 2023 · 1 comment
Open
4 tasks done
Labels

Comments

@cedk
Copy link

cedk commented Nov 1, 2023

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.
  • If this is an issue with a particular app, I have tried filing it in the appropriate issue tracker for the app (e.g. under https://github.com/flathub/) and determined that it is an issue with Flatpak itself.
  • This issue is not a report of a security vulnerability (see here if you need to report a security issue).

Flatpak version

1.14.4

What Linux distribution are you using?

Gentoo Linux

Linux distribution version

6.1.57-gentoo-dist

What architecture are you using?

x86_64

How to reproduce

  1. Set XDG_RUNTIME_DIR to /tmp/${USER}/runtime
  2. Run a flatpack application with file chooser
  3. Read the selected file

Expected Behavior

The file can be read.

Actual Behavior

The application does not find the file.

Additional Information

Changing the XDG_RUNTIME_DIR to /tmp/user/${UID} works.

@cedk cedk added the bug label Nov 1, 2023
@algor512
Copy link

algor512 commented Nov 28, 2023

It seems I'm stuck with the same problem. My host's XDG_RUNTIME_DIR is set to /tmp/1000-runtime-dir.gcO/, whereas inside the sandbox, it is /run/user/1000/. When attempting to save a file, such as test.txt, it appears in /tmp/1000-runtime-dir.gcO/doc/c25fa616/ on both my host system and inside the sandbox. However, the folder /run/user/1000/doc/c25fa616/ inside the sandbox remains empty, even though it exists.

It seems that the file chooser placed a file at $HOST_XDG_RUNTIME_DIR/doc/(some hash), while an
application inside the sandbox (in my case, Firefox) expects to find it at
$SANDBOX_XDG_RUNTIME_DIR/doc/(some hash).

I hope it will be helpful.

UPD. I use Flatpak 1.15.6 on Void Linux (glibc version).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants