RetroPie-Setup icon indicating copy to clipboard operation
RetroPie-Setup copied to clipboard

Fix chown to use primary group of user for group name

Open kmcfate opened this issue 3 years ago • 4 comments

Sometimes there is a 'users' group, not a group per user. This makes it use primary group of user, not the explicit user name for group name.

kmcfate avatar Sep 09 '22 04:09 kmcfate

Thanks.

Yeah, it was always designed around there being a group with the same name (as RetroPie originated on an OS where this was the default). The changes look good, but I will need to give it a test etc.

joolswills avatar Sep 18 '22 13:09 joolswills

After a discussion with some other developers, we would prefer this to be implemented with a variable $group. eg doing group=$(id -ng) in retropie_packages.sh and then doing chown $user:$group. Primarily because it's a clearer more well known syntax than leaving the group name out of the chown.

I'm happy if you want to change this PR to implement it like that, or if you prefer I can make the changes. Thanks again.

joolswills avatar Sep 22 '22 17:09 joolswills

@joolswills I made a pull request following that guideline.

laiti avatar Dec 24 '22 08:12 laiti

Going to do this with some variable name changes in addition. Sorry for delays but will look at this soon.

joolswills avatar Jan 05 '23 15:01 joolswills