此主題已被鎖定
RootPain 2023 年 11 月 19 日 上午 9:44
(Arch/Artix) Missing File Privileges & Library Problems
I've been attempting to share my library folder with another user on my computer, so I put all of my games on my 2nd HDD and changed the group owner to "steam" and added both users to that group, so Steam can access, write and execute it the folder without any issues

However, with every reboot, the permissions seemingly reset, and when booting Steam, a bunch of my games need to be "updated" again, and some of these games can't be updated at all, giving me the "missing file privileges" message, and unless I redo the commands again (sudo chmod -R 770 and sudo chown -R :steam /mnt/newhdd/) the problem won't go away, and I have to do this every time the system is rebooted

There's also the problem that despite the games being installed, there are times where the other user is unable to start the game at all, while the other can start it just fine

Does anyone know a way to solve these issues?
If I can get at least the permissions problem solve, I'll be fine.
< >
目前顯示第 1-15 則留言,共 20
Yujah 2023 年 11 月 19 日 上午 10:51 
引用自 RootPain
However, with every reboot, the permissions seemingly reset
This is (undoubtedly) to say that your Steam library is on an NTFS filesystem.

NTFS is not a POSIX-type filesystem and does not support (normal) per file/directory UNIX ownership and/or permissions. Those credentials still however being fundamental to the UNIX model, Linux mounts an NTFS filesystem with filesystem-wide "pretend" credentials, specifically and unless adjusted through mount-parameters as root:root and ugo=rwx -- at least the historically used NTFS-3G userspace NTFS driver does; Arch may or may not at this time use the new-ish NTFS3 kernelspace one which in turn may or may not act differently by default. Dunno.

The above is to say that NTFS is a bad fit for a UNIX-type system and should not be used period, other than for its intended purpose of sharing a filesystem with a dual-boot copy of Windows on the same machine. But note that at least as far I still know (I do not and have not for a long time dual-booted) sharing a Steam library between Steam on dual-boot Windows and Linux is not possible or a bad idea anyway: at least historically the same credential issue as above would cause Steam on Linux to constantly redownload games in an NTFS-hosted library.

That is, you very preferably reformat your library disk with a proper UNIX-type filesystem; ext4 normally on Linux. Only if that's definitively not an option should you choose to use what I referred to above and adjust credentials manually.

Specfically for your mentioned :steam and 770 you'd use "gid=steam,umask=007". If you mount the filesystem at boot through /etc/fstab this is also where you specify such. F.e.
UUID=0123456789ABDEF /mnt/newhdd ntfs-3g gid=steam,umask=007
If you mount via the desktop automounter then it's (again, historically and depending on versions of software used on Arch) an issue to specify mount parameters.

In any case -- not using NTFS in Linux is as said a better idea anyway so do that if at all possible.
最後修改者:Yujah; 2023 年 11 月 19 日 上午 10:59
Satoru 2023 年 11 月 19 日 上午 11:27 
Steam does not support libraries on shared or network drives
Yujah 2023 年 11 月 19 日 上午 11:30 
Neither shared nor network drives are the issue ("another user on my computer", "my second HDD"). Dual-boot may be, but in any case NTFS will be; see above.
最後修改者:Yujah; 2023 年 11 月 19 日 上午 11:37
RootPain 2023 年 11 月 19 日 下午 12:03 
引用自 Yujah
引用自 RootPain
However, with every reboot, the permissions seemingly reset
This is (undoubtedly) to say that your Steam library is on an NTFS filesystem.

NTFS is not a POSIX-type filesystem and does not support (normal) per file/directory UNIX ownership and/or permissions. Those credentials still however being fundamental to the UNIX model, Linux mounts an NTFS filesystem with filesystem-wide "pretend" credentials, specifically and unless adjusted through mount-parameters as root:root and ugo=rwx -- at least the historically used NTFS-3G userspace NTFS driver does; Arch may or may not at this time use the new-ish NTFS3 kernelspace one which in turn may or may not act differently by default. Dunno.

The above is to say that NTFS is a bad fit for a UNIX-type system and should not be used period, other than for its intended purpose of sharing a filesystem with a dual-boot copy of Windows on the same machine. But note that at least as far I still know (I do not and have not for a long time dual-booted) sharing a Steam library between Steam on dual-boot Windows and Linux is not possible or a bad idea anyway: at least historically the same credential issue as above would cause Steam on Linux to constantly redownload games in an NTFS-hosted library.

That is, you very preferably reformat your library disk with a proper UNIX-type filesystem; ext4 normally on Linux. Only if that's definitively not an option should you choose to use what I referred to above and adjust credentials manually.

Specfically for your mentioned :steam and 770 you'd use "gid=steam,umask=007". If you mount the filesystem at boot through /etc/fstab this is also where you specify such. F.e.
UUID=0123456789ABDEF /mnt/newhdd ntfs-3g gid=steam,umask=007
If you mount via the desktop automounter then it's (again, historically and depending on versions of software used on Arch) an issue to specify mount parameters.

In any case -- not using NTFS in Linux is as said a better idea anyway so do that if at all possible.

I'm using a EXT4 system for my 2nd HDD

Here's the FSTAB config:
UUID=3ada7550-9bf8-4afc-8962-0b8f658e7fba /mnt/newhdd ext4 defaults,noatime 0 1
Yujah 2023 年 11 月 19 日 下午 12:10 
It's in that case basically impossible that as you said, "with every reboot, the permissions seemingly reset". That does happen with NTFS-3G in the described sense of UNIX-credentials not being stored by NTFS but most certainly does not on ext4.

I.e., sorry, but makes no sense. As in, not at all. A chmod/chgroup is not volatile on ext4.
RootPain 2023 年 11 月 19 日 下午 12:29 
引用自 Yujah
It's in that case basically impossible that as you said, "with every reboot, the permissions seemingly reset". That does happen with NTFS-3G in the described sense of UNIX-credentials not being stored by NTFS but most certainly does not on ext4.

I.e., sorry, but makes no sense. As in, not at all. A chmod/chgroup is not volatile on ext4.

I thought I formatted this HDD to ext4
Should I reformat it then? Maybe that will fix it?
Yujah 2023 年 11 月 19 日 下午 12:42 
Well, no, darn it, your description made perfect sense when assuming your library was on NTFS but with type ext4 in your /etc/fstab it would not make sense that it in fact would be and this then turned into a drawn-out Linux crap-fest immediately again even if it seemed so clear. Sigh...

Let us any case verify. Make sure that you play or try to play through Steam one of the games in the library so as to make sure all potential auto-triggers have been triggered and use simply "mount" in a terminal to see what is mounted how on /mnt/newhdd.

I'd still be surprised to see ext4.
RootPain 2023 年 11 月 19 日 下午 9:22 
引用自 Yujah
Well, no, darn it, your description made perfect sense when assuming your library was on NTFS but with type ext4 in your /etc/fstab it would not make sense that it in fact would be and this then turned into a drawn-out Linux crap-fest immediately again even if it seemed so clear. Sigh...

Let us any case verify. Make sure that you play or try to play through Steam one of the games in the library so as to make sure all potential auto-triggers have been triggered and use simply "mount" in a terminal to see what is mounted how on /mnt/newhdd.

I'd still be surprised to see ext4.

I used the mount command, and it gave me
"/dev/sdb1 on /mnt/newhdd type ext4 (rw,noatime)"
Yujah 2023 年 11 月 19 日 下午 9:56 
Okay. And is the library in question in Steam -> Settings -> Storage shown as living under /mnt/newhdd/ indeed? Do both accounts also have a private library set up?

Have you installed Steam as a native package (i.e., via pacman in your case) or as a flatpak?

I do by the way assume that both machine-local users use the same Steam account? If not then you would be sharing a library between Steam accounts rather than just UNIX-accounts and the issue would not so much be needing to reset credentials for latter; sharing a library between Steam accounts supposedly just doesn't work indeed -- although just steamapps/common could supposedly (and "generally") be linked....

I also assume that not concurrent access to that single library from both machine-local user accounts is being attempted? If it is, yes, don't do that.

Thinking...

I do in fact suppose ownership of files could change, although not on reboot but after "usertwo" launches steam, and although your chown implied user as such to not be the issue, your users primary group may get set on new files and that's supposedly not the group "steam"...

More info is needed as to your setup I'm afraid.
RootPain 2023 年 11 月 19 日 下午 10:04 
引用自 Yujah
Okay. And is the library in question in Steam -> Settings -> Storage shown as living under /mnt/newhdd/ indeed? Do both accounts also have a private library set up?

Have you installed Steam as a native package (i.e., via pacman in your case) or as a flatpak?

I do by the way assume that both machine-local users use the same Steam account? If not then you would be sharing a library between Steam accounts rather than just UNIX-accounts and the issue would not so much be needing to reset credentials for latter; sharing a library between Steam accounts supposedly just doesn't work indeed -- although just steamapps/common could supposedly (and "generally") be linked....

I also assume that not concurrent access to that single library from both machine-local user accounts is being attempted? If it is, yes, don't do that.

Thinking...

I do in fact suppose ownership of files could change, although not on reboot but after "usertwo" launches steam, and although your chown implied user as such to not be the issue, your users primary group may get set on new files and that's supposedly not the group "steam"...

More info is needed as to your setup I'm afraid.

Yes, the storage for the 2nd HDD is indeed setup on /mnt/newhdd/

I've installed it native via pacman

And I share my library with another user, but that other user has his own Steam account
I wanted to share my games with another user so he could use my computer and play all my games without fiddling with anything important or even my account in general

And I've found out that certain games will also refuse to run if they were installed by another user, with the error message on the terminal being something amongst the lines of "pfx is not owned by you", and although usually deleting said folder allows the game to run properly, there has to be better ways to solve this.
Yujah 2023 年 11 月 19 日 下午 10:12 
Okay, yes, if you are sharing between Steam accounts then you will want/need to do so via family-sharing: https://help.steampowered.com/en/faqs/view/57A7-503C-991F-E9A8

(a note is that a current bug as to the discovery for those "eligible accounts" is that users may need to login to "Friends & Chat" -- lower-right corner of the Steam client -- while setting up)

Once you have that set up you are not yet sharing disc space for the games as such, since the sharing users would "need" to download and install to his/her own library -- but once setup you can in fact and as said supposedly link steamapps/common from a common source.

In any case though first set up family-sharing. Another Steam account can't just play your games, at least not those that in fact use Steam DRM. Disc-space sharing is then a secondary hack after things work without...
最後修改者:Yujah; 2023 年 11 月 19 日 下午 10:17
RootPain 2023 年 11 月 20 日 上午 9:49 
引用自 Yujah
Okay, yes, if you are sharing between Steam accounts then you will want/need to do so via family-sharing: https://help.steampowered.com/en/faqs/view/57A7-503C-991F-E9A8

(a note is that a current bug as to the discovery for those "eligible accounts" is that users may need to login to "Friends & Chat" -- lower-right corner of the Steam client -- while setting up)

Once you have that set up you are not yet sharing disc space for the games as such, since the sharing users would "need" to download and install to his/her own library -- but once setup you can in fact and as said supposedly link steamapps/common from a common source.

In any case though first set up family-sharing. Another Steam account can't just play your games, at least not those that in fact use Steam DRM. Disc-space sharing is then a secondary hack after things work without...

Family sharing was enabled from the very beginning
It's just the permissions and the whole ♥♥♥♥♥♥ library and permissions thing that's been making the proccess hard to deal with.
Yujah 2023 年 11 月 20 日 下午 4:44 
引用自 RootPain
Family sharing was enabled from the very beginning
Would've been sort of good if you had been more explicit about context from said very beginning then lest I in my vain hope of being helpful just keep dropping myself into wrong assumptions...

Anyways. I just tested things (mind you, on a Debian base) and have it working. First off and just to be explicit also for readers: once family-share has been set up things basically work as is and the only part of the matter left is physically sharing a bunch of game data over two distinct UNIX accounts. If the shared-to account doesn't mind downloading and installing private copies of the games you don't need any of this.

If he/she however does mind, "bindfs" works. I.e., also referring to my above worry about "primary group" there's too many potential or real ownership issues to just flat-out share but you can use bindfs to bind-mount the libraries into e.g. the home-directories with "fake" permissions.

To wit, I have my shared-from Steam-account's library at say /data/SteamLibrary and have two UNIX-users yujah:steam (with its Steam account shared-from) and guest:steam (with its Steam-account shared-to) that bind-mount it into their homes as
sudo bindfs --perms=0660:+X --force-user=yujah --force-group=steam /data/SteamLibrary ~yujah/SteamLibrary
and same with s/yujah/guest/ (the ~/SteamLibrary mountpoints need to exist; mkdir). After adding ~/SteamLibrary to both Steam accounts' Settings -> Storage both have access and as far as I've been able to see all works also as to downloading.

A note is that you may want --mirror and/or --map rather than the above --force-user and --force-group but seems to work for me; "man bindfs" for details. I will assume that "bindfs" is available from the Arch repo.

Hope it helps.
Yujah 2023 年 11 月 20 日 下午 5:42 
Oh, and let me by the way add that the above translates to /etc/fstab as

bindfs#/data/SteamLibrary /home/yujah/SteamLibrary fuse perms=0660:+X,force-user=yujah,force-group=steam bindfs#/data/SteamLibrary /home/guest/SteamLibrary fuse perms=0660:+X,force-user=guest,force-group=steam
RootPain 2023 年 11 月 20 日 下午 7:06 
引用自 Yujah
引用自 RootPain
Family sharing was enabled from the very beginning
Would've been sort of good if you had been more explicit about context from said very beginning then lest I in my vain hope of being helpful just keep dropping myself into wrong assumptions...

Anyways. I just tested things (mind you, on a Debian base) and have it working. First off and just to be explicit also for readers: once family-share has been set up things basically work as is and the only part of the matter left is physically sharing a bunch of game data over two distinct UNIX accounts. If the shared-to account doesn't mind downloading and installing private copies of the games you don't need any of this.

If he/she however does mind, "bindfs" works. I.e., also referring to my above worry about "primary group" there's too many potential or real ownership issues to just flat-out share but you can use bindfs to bind-mount the libraries into e.g. the home-directories with "fake" permissions.

To wit, I have my shared-from Steam-account's library at say /data/SteamLibrary and have two UNIX-users yujah:steam (with its Steam account shared-from) and guest:steam (with its Steam-account shared-to) that bind-mount it into their homes as
sudo bindfs --perms=0660:+X --force-user=yujah --force-group=steam /data/SteamLibrary ~yujah/SteamLibrary
and same with s/yujah/guest/ (the ~/SteamLibrary mountpoints need to exist; mkdir). After adding ~/SteamLibrary to both Steam accounts' Settings -> Storage both have access and as far as I've been able to see all works also as to downloading.

A note is that you may want --mirror and/or --map rather than the above --force-user and --force-group but seems to work for me; "man bindfs" for details. I will assume that "bindfs" is available from the Arch repo.

Hope it helps.
I'll try these instructions once home and give you an update

I do appreciate the help though
< >
目前顯示第 1-15 則留言,共 20
每頁顯示: 1530 50

張貼日期: 2023 年 11 月 19 日 上午 9:44
回覆: 20