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

Proton not working when multiple Linux users share a single installation path #4820

Open
Maykin-99 opened this issue May 13, 2021 · 16 comments · May be fixed by #4861
Open

Proton not working when multiple Linux users share a single installation path #4820

Maykin-99 opened this issue May 13, 2021 · 16 comments · May be fixed by #4861

Comments

@Maykin-99
Copy link

I've followed these instructions on Reddit to allow multiple Linux users to share the same installation folder without dealing with permission issues. That seems to work so far for Linux-native games.

The issue with Proton games is that Wine does not allow using a Wine-Prefix that doesn't belong to the current user.

Example:

Both Steam clients on both Linux accounts are configured to download the games in /opt/games/Steam.

User maykin installs a Windows game and a Wineprefix in /opt/games/Steam/steamapps/compatdata/430190/pfx is created.

User steamuser wants to play the same game.
It does not need to install the game again, since maykin already installed it.
When attempting to start the game nothing happens (no game & no error message).
When inspecting the logs the following error occur:

Installing breakpad exception handler for appid(steam)/version(1618256785)
Proton: Upgrading prefix from 5.13-1 to 6.3-2 (/opt/games/Steam/steamapps/compatdata/430190/)
Proton: Removing stale builtin /opt/games/Steam/steamapps/compatdata/430190/pfx//drive_c/windows/system32/amd_ags_x64.dll
Proton: Removing stale builtin /opt/games/Steam/steamapps/compatdata/430190/pfx//drive_c/windows/syswow64/amd_ags_x64.dll
wine: '/opt/games/Steam/steamapps/compatdata/430190/pfx' is not owned by you
wine: '/opt/games/Steam/steamapps/compatdata/430190/pfx' is not owned by you
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
wineserver: /opt/games/Steam/steamapps/compatdata/430190/pfx is not owned by you
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/steamuser/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
wine: '/opt/games/Steam/steamapps/compatdata/430190/pfx' is not owned by you

The relevant part is (so I assume) wine(server): /opt/games/Steam/steamapps/compatdata/430190/pfx is not owned by you.

The directory is owned by maykin but steamuser has read and write access to it but Wine - for security reasons apparently - doesn't care and demands that the prefix is owned by the current user, i.e. steamuser.

My suggestion:

  1. Create a new prefix per user:
    Instead of creating the prefix here: /opt/games/Steam/steamapps/compatdata/<gameid>/pfx we could place it there: /opt/games/Steam/steamapps/compatdata/<gameid>/pfx/<userid>
  2. Use symbolic links so that all prefixes share the same data:
    Put the device_c in a separate directory outside the prefix, e.g. in /opt/games/Steam/steamapps/compatdata/<gameid>/data, and place a symbolic link in /opt/games/Steam/steamapps/compatdata/<gameid>/pfx/<userid/device_c that points to the data directory
@kisak-valve
Copy link
Member

Hello @Maykin-99, upstream wine does not allow the wine prefix to be being owned by another user to prevent an entire category of problems. Proton inherits this behavior and ideally, your issue would need to be evaluated and resolved upstream with vanilla wine before looking at it here.

@aeikum
Copy link
Collaborator

aeikum commented May 13, 2021

I'm pretty sure this is a Steam client limitation more than anything else. You're not intended to share Steam Library folders between users. Some applications do stupid things like write files directly into the Library folders, which can fail with multiple users.

@Maykin-99
Copy link
Author

@kisak-valve: I'm sure Wine does what it does for a good reason. In fact, if we look into their forum it states "Risk of of registry corruption" as the reason: Link

In the same post it also suggests creating a wine prefix for each user and store the data outside of it:

If you just want to save space, you can install apps to a single directory shared by multiple users outside their wineprefixes. You will have to run the installer for each user to create the needed registry entries for each, but just point the installer to the shared directory instead of accepting the default in Program Files when it asks where you want to install the app to. Make sure all users have read/write permissions for that directory.

So I simply ask Valve to follow their advice.

@aeikum

I'm pretty sure this is a Steam client limitation more than anything else.

I'm honestly not sure which piece of software (Steam Client vs. Proton) is configuring wineprefix. I'll reference this issue in the steam-for-linux repository.

You're not intended to share Steam Library folders between users.

I disagree. It works in Windows and I expect it to work in Linux as well.

Some applications do stupid things like write files directly into the Library folders, which can fail with multiple users.

Though in my experience this only causes that save games & configurations are shared unintendedly. And I don't expect Valve to fix game developer's "stupid things".

Maykin-99 added a commit to Maykin-99/Proton that referenced this issue May 26, 2021
Fixes ValveSoftware#4820 by setting the base directory of `CompatData` from `steamapps/compatdata/<steamid>/` to `steamapps/compatdata/<steamid>/<userid>/`  (I'm honestly surprised that it worked without a hitch).

The only issue is that the old files still exist.
Ideally we would move them to the new path.
I assume that would belong in `upgrade_pfx`? Or is it even necessary?
@Maykin-99 Maykin-99 linked a pull request May 26, 2021 that will close this issue
@EgorIII
Copy link

EgorIII commented Mar 25, 2023

i've spend evening trying to launch game on my notebook for my friend to get to this issue.

Can we at least for now have some proper error pop up?

Cause right now if you try to do that steam will do funny: button is blue cause game is running, oh and now button is green to launch it again like nothing happened whatsoever, and even error text in console does not provide that much information, cause i was setting that share library permission to all kinds of stuff.

@geoffryan
Copy link

Just adding a voice to the chorus, it would be lovely if this could be fixed. We have a single Linux computer shared by the household. Games are massive, so we install them to a shared directory and use Family Sharing to share the games, but of course run into this proton permissions issue. I don't see the point of local family sharing if you still have to install games per-user.

@jessecambon
Copy link

jessecambon commented Apr 9, 2024

Also wanted to add that this would be a really useful addition. I am trying to share a game library between an admin account that is meant for regular PC use and a passwordless account that is meant to be used via controller in front of a TV (ie. console-style experience). I've tried a number of different solutions, but haven't found a way to get past the "compatdata is not owned by you" error.

@sworthiness
Copy link

Agreed - this is stopping me sharing my games with my kids with their own accounts
Would love for this to get resolved

@I-Am-Xil
Copy link

Yet another comment to this 3 year old thread. Other people in my household can't play games run with proton without granting access to the sys admin user, which not only becomes an inconvenience, but also a privacy and security concern since it would mean giving other people access to first of all a personal user, but also to possibly a sudoer. This would also help mimic native games behavior.

Giving an option to grant access based on group rather than user ownership is the way to go forward with this issue.

@ChrisBoomhower
Copy link

Yep, I'm in the same boat as others. I'd love to see this resolved for the same reasons.

@couchsweetpotato
Copy link

Same here, my partner and I share the "gaming pc", and we don't have enough storage to install 100+GB like BD3 or FO76 twice, I understand the limitations because of how privileges work in Linux, but games are getting bigger and bigger, and it's not viable to install things twice anymore.

To me (not a programmer) this approach seems pretty clean and I´d like to think that its possible using symlinks for the game data while keeping the prefixes in the home folders.

I read somewhere while looking for a solution for this that sharing the installation folder would mean having to share game settings between users, but afaik that isn't true for pretty much every modern game. And when it comes to older games saving confs in the installation folder, I wouldn't consider that to be a problem because that's the intended behavior and would work in windows just the same.

@BigBrawler
Copy link

I would like to see this too.

@etyarews
Copy link

etyarews commented Sep 8, 2024

I just want /compatdata to be independent of the library. Most games save to /compatdata and this would prevent save files being shared, as weel as the issues with permission. I don't see any drawback.

Heck, this PR fixes all the issues with the current implementation.

@kamichal
Copy link

Currently facing the same issue. My kids and I finally got a super-duper gaming PC, I'm a linux pro user for over 10 years, did my best to give the shared permissions to the games storage directory, but this still raises permission issues.

No CS today, no CS tomorrow. Why are you doing it to us? It's a torture. And my son asks me if somebody better skilled than me can solve it.. Please fix it

@etyarews
Copy link

@kamichal you can do some really cursed thing where the shared library compatdata is mounted to a compatdata inside each user during log-in

It is not the proper fix, but could help you and your family

@kamichal
Copy link

I could try, but what exactly do you mean? Sounds like not a symbolic link, but some per-user mount, isn't?
So, as I understood, a mount point should be /opt/games/steamapps/compatdata and for each user, the source of the data should be /home/given_user/.local/share/Steam/steamapps/compatdata ?

@etyarews
Copy link

Pretty much. I haven't tested it yet, as I'm going to be building a shared super-duper PC during November, but I've asked around and you should create a service for each user that does this on login

This has the annoying issue of making it a nightmare if you change from one user to another(as in, Linux user) without ending that session, but hey, better than nothing.

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

Successfully merging a pull request may close this issue.