I have three users in my home directory, all of which using the XFCE DE.
If I log into one of them, then I cannot log out and log into any of the other two.
The only way to achieve that is to log in as root and do a recursive chown of the folder to assign it to the correct user. Then log in can proceed.
However, loggin in another user forces all of the above to be repeated every time.
I do not understand why each user is losing ownership of its own folder every time.
chown
command change permissions for one user or group – so if you change permissions with chown old user lose permissions. If you want to give many users permissions you should use setfacl
command.
What do the permissions look like for you?
ls -al /home
this should work:
the individual user directories should be owned by
user = username
and
group = users
like this:
ls -al /home
total 16
drwxr-xr-x 4 root root 4096 Feb 4 15:40 .
drwxr-xr-x 17 root root 4096 Feb 13 07:03 ..
drwx------ 19 user_1 users 4096 Mar 21 18:57 user_1
drwx------ 15 user_2 users 4096 Feb 6 18:15 user_2
although, I must say
it also works flawlessly (for me)
if the individual users home directories
are owned by user and group of that current user
eg:
LANG=C ls -al /home
total 16
drwxr-xr-x 4 root root 4096 Feb 4 15:40 .
drwxr-xr-x 17 root root 4096 Feb 13 07:03 ..
drwx------ 19 user_1 user_1 4096 Mar 21 18:57 user_1
drwx------ 15 user_2 user_2 4096 Feb 6 18:15 user_2
By default it is owned by username:username not ‘users’ group.
Yes, in fact I think the ‘users’ group is a legacy thing that shouldn’t be used anymore: Users and groups - ArchWiki
I have a fairly recent Arch installation (~ half a year old)
installed via the Archlabs installer
and a Manjaro VM as well.
On the Manjaro VM it is like @omano said.
On the Arch system the ownership is user = username and group = users
Both work well and don’t have that issue that the OP has.
That issue has to be due to something else, due to some other cause.
Thanks to everyone for the suggestion.
I checked with ls -al /home and saw that user_2 and user_3 belonged to group user_1.
Thus,
I assigned each user to its own group
logged out of GUI and logged into console as root
chown -R user_2:user_2 /home/user_2
same for user_3
now I can log in and out of each user without problems