Pretty much anything "low-level" you do in linux should be done through systemd. Running sudo is usually a disaster. I wouldn't know much beyond that. I have the Flatpak version of Steam installed which I think would work much better for this since when you add a directory to flatpak Steam it does some fancy stuff to map it into the program's mount namespace for reading and writing. So if you want to add an external drive or directory to Steam you just "Add Drive" and it will make it accessible.
libre
Welcome to libre
A comm dedicated to the fight for free software with an anti-capitalist perspective.
The struggle for libre computing cannot be disentangled from other forms of socialist reform. One must be willing to reject proprietary software as fiercely as they would reject capitalism. Luckily, we are not alone.
Resources
- Free Software, Free Society provides an excellent primer in the origins and theory around free software and the GNU Project, the pioneers of the Free Software Movement.
- Switch to GNU/Linux! If you're still using Windows in
$CURRENT_YEAR
, flock to Linux Mint!; Apple Silicon users will want to check out Asahi Linux.
Rules
- Be on topic: Posts should be about free software and other hacktivst struggles. Topics about general tech news should be in the technology comm or programming comm. That doesn't mean all posts have to be serious though, memes are welcome!
- Avoid using misleading terms/speading misinformation: Here's a great article about what those words are. In short, try to avoid parroting common Techbro lingo and topics.
- Avoid being confrontational: People are in different stages of liberating their computing, focus on informing rather than accusing. Debatebro nonsense is not tolerated.
- All site-wide rules still apply
Artwork
- Xenia was meant to be an alternative to Tux and was created (licensed under CC0) by Alan Mackey in 1996.
- Comm icon (of Xenia the Linux mascot) was originally created by @ioletsgo
- Comm banner is a close up of "Dorlotons Degooglisons" by David Revoy (CC-BY 4.0) for Framasoft
So, the most obvious thing is to run the command gksudo, which ought to prompt for the password on login. Your user enters their password and it all works.
Don’t do that.
Number one it’s bad practice to blindly enter your password and number two having a user editable script that you run blindly every time you log in is a real vulnerability.
If you can do it with groups, do that. Have everyone be in the group and have the permissions of the directory let them do what they need to do if they’re in the group.
If that doesn’t work for some reason (you can change steams file creation mask) then acls are the next thing to try.
First thought, can you put the command in a script and then set the setuid bit to run it as root?
Another thought, and this might be preferable but would require more work and research, look into automount and how USB storage devices are automounted. On many distros they are auto mounted on something like /media/user with all the perms and ownership of the current logged in user. I know you are not talking about USB but it should be a similar type of automount. You could create an exported nfs share on your /share/games dir, and then (auto)mount it with appropriate perms and owners in your user directory /home/user/whatever.
Also look at some other mount options like “bind” and loopback.
After spending a few minutes reading about how steam handles .acf files and how unpredictable that is, the most elegant solution would be more storage.
Is it not sufficient to just chmod -R g+rwxs /share/steam
? That should get you read/write/execute and also set the setgid
bit so that any files created there will be assigned the proper group (I expect this is probably the issue that otherwise demands changing ownership of files between logins).
i think with proton games it's not enough. https://github.com/ValveSoftware/Proton/issues/4820 from my knowledge, proton seems to demand that prefixes are "hard" owed by current user, shared isn't good enough
I am a dumb dumb, but can you set specific commands to be run as sudo without password in the sudoers file?
Or the setuid bit?
this is looking like the most convenient option, thanks