Skip to content

[Bug]: Symbolic links used in (home) directory break directory permission (even when overriding/removing the permission) #4894

Closed

Description

@rugk

Checklist

Flatpak version

1.12.7

What Linux distribution are you using?

Fedora Silverblue

Linux distribution version

36 (36.20220512.1)

What architecture are you using?

x86_64

How to reproduce

  1. Make a symbolic link from your Music folder, e.g. to a place where it is synchronized with other data. So e.g. it ends up like this:
    $ ls -la /var/home/rugk/Musik
    lrwxrwxrwx. 1 rugk rugk 16  5. Jun 2020  /var/home/rugk/Musik -> Nextcloud/Musik/
    
  2. Now install and try to run Steam from Flathub. (-> Does not work, see below)
  3. Now try to remove (override) the permission for that flatpak so it ignores the Music directory (I actually anyway do not want it to have access there):
    $ flatpak --user override --nofilesystem=xdg-music com.valvesoftware.Steam
    
  4. Try to run it again. -> Still does not work.

Expected Behavior

Run as usual.

Especially if I explicitly remove the permission I should be able to run it.

Actual Behavior

$ flatpak run com.valvesoftware.Steam 
bwrap: Can't make symlink at /var/home/rugk/Musik: File exists

Even when the permission is removed, aka it shows something like the below, it does not work:

flatpak info --show-permissions com.valvesoftware.Steam        
[Context]
shared=network;ipc;
sockets=x11;wayland;pulseaudio;
devices=all;
features=devel;multiarch;bluetooth;per-app-dev-shm;
filesystems=xdg-run/app/com.discordapp.Discord:create;!xdg-pictures;!xdg-music;
persistent=.;

Additional Information

Steam does have filesystems=…xdg-music:ro; which causes this issue as a permission.
As my use case is IMHO not a far fetched (and actually real use case) one (i.e. "As a Linux user, i want to be able to freely use symbolic links in my home directory, so I can synchronize stuff e.g. with external tools [like Nextcloud].") I wonder/hope that symbolic links on my hosts should not randomly break flatpak apps.

This has been reported downstream as flathub/com.valvesoftware.Steam#887. (also more details there)
Also I see this may be similar to #3477, as it's also a symbolic link error. However, what is different is that:

  • in my case, I want to keep the symbolic link, so removing it is no solution
  • in my case, it also fails when I remove the permission that causes the error, which is really nasty behavior, because that would/could have been a good and straightforward workaround, but well…

Activity

  1. Janybanny commented on Jun 14, 2022

    @Janybanny

    @rugk Did you ever find a solution/workaround for this? Facing the same issue

  2. rugk commented on Jun 29, 2022

    @rugk
    Author

    Well, except of deleting the symbolic link (🙃), no.🫤😅

  3. pineapplehunter commented on Jul 1, 2022

    @pineapplehunter

    I found a temporary workaround.
    This will change the xdg paths only for steam.

    Edit: Sorry this only works for opening steam it self. When starting a game I got the same error.

    1. Create some directory (in my case ~/.config/steam-xdg-dir)
    2. Copy .config/user-dirs.dirs to the new directory (cp ~/.config/user-dirs.dirs ~/.config/steam-xdg-dir/)
      example of the contents of user-dirs.dirs
    ...
    XDG_MUSIC_DIR="$HOME/Music"
    XDG_PICTURES_DIR="$HOME/Pictures"
    ...
    1. Change the contenst of the new user-dirs.dirs and set some dummy paths
    ...
    XDG_MUSIC_DIR="$HOME/.steam/Music"
    XDG_PICTURES_DIR="$HOME/.steam/Pictures"
    ...
    1. Run steam with XDG_CONFIG_HOME variable set to the directory.
    $ XDG_CONFIG_HOME=$HOME/.config/steam-xdg-dir flatpak run com.valvesoftware.Steam
  4. msdobrescu commented on Mar 12, 2023

    @msdobrescu

    I have this issue too with the Heroic Games Launcher due to creating a symlink to a partition in my home directory, ~/Games.

  5. hfiguiere commented on Feb 11, 2024

    @hfiguiere
    Collaborator

    See #2387

  6. hfiguiere commented on Feb 11, 2024

    @hfiguiere
    Collaborator

    Duplicate

  7. rugk commented on Mar 7, 2024

    @rugk
    Author

    @hfiguiere The issue I initially (re-)opened this not as a dupe was that even an obvious workaround removing the broken permission fails:

    Also I see this may be similar to #3477, as it's also a symbolic link error. However, what is different is that:
    […]
    in my case, it also fails when I remove the permission that causes the error, which is really nasty behavior, because that would/could have been a good and straightforward workaround, but well…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions