Remove access restriction from home directory

Hello,

I have several partitions on my computer with different flavors of linux.
I've just installed kde and when I click the particular partition in the file manager, and enter the password the home directory of the other distro is still not available due to permission restrictions.
Is it possible to remove that permission restriction from the home directory?
Thanks

I have a suspicion it is uid related - please post result of id username where username is yours...

It can be 'fixed' if this is the problem...

1 Like

*for both distros, and also ls -ld on the directory you’re trying to access.

1 Like
id mak             
uid=1001(mak) gid=1001(mak) groups=1001(mak),3(sys),90(network),98(
power),998(wheel),995(audio),993(input),991(lp),986(video),976(plug
dev)

Normally the first user is UID 1000, so this probably explains why you can’t access the other directories.

You have two choices:

  1. Alter the UIDs to match for all distros
  2. Create a common group (with a common GID) for each distro, add your user to that group (in each distro) and then change group ownership of the directory to that group (chgrp).

For lots of information about Users and Groups check the Arch wiki page:

https://wiki.archlinux.org/index.php/Users_and_groups

and you will be able to find plenty out there on the web about UNIX file permissions.

2 Likes

What I have found the easiest is to change the uid in Garuda as follows:

  1. Exit Garuda, and login as root (important not to be already there as 'username' - where username is your name)
  2. enter usermod -u 1002 guest
  3. enter groupmod -g 1002 guest
  4. enter usermod -u 1000 username
  5. enter groupmod -g 1000 username

The logout and login in as 'username' and see if it got it :grin:

4 Likes

Huh. So Garuda guest user is UID 1000. I think that could be fixed, e.g. guest could be 500-999 as it's not a "normal" user.

@librewish might be a tweak to the profile?

3 Likes

I was hoping he'd get that - if the guest creation included useradd -u 1001 I think the problem would disappear (or if the original user already had 1000, of course)

Could you give me precise instruction how to do change the guest and the user to UID 1000

Read here:

1 Like

I can login either as a guest or me as user. There is no root login. Can I execute these command from the console, like "sudo su" as root.

But why is it that the other system folders have no such restriction only the home folder?

Use “other” and write for user ->root

first check

cat /etc/passwd | grep $USER
cat /etc/passwd | grep guest

then, if guest is not empty, you can delete guest in Garuda-Welcome / Settings / uncheck Guest user support.

then

usermod -u 1000 your-user-name
groupmod -g 1000 your-user-name

Only the home folder is protect by user password.

Okay i will do it this way.

Just use 999
For guest user

2 Likes

I got these 2 error messages.
usermod: user mak is currently used by process 2094
usermod: group '1000' does not exist


The easiest way to correct the permissions issue is to remove the Guest account completely from the system. The guest account can be removed with the Garuda welcome utility, or via this command:

sudo pacman -R systemd-guest-user

After removing the guest account, reassign your user account UID & GID to 1000.

Power down completely, then restart. Do not login to your desktop session, instead switch to a TTY. Press CTRL+ALT+F3 to get to TTY3, then login as root (not your user account):

On the root account enter the following commands (you must substitute your username for "user"):

usermod -u 1000 user
groupmod -g 1000 user

After successfully reasigning the UID & GID, switch back to the login screen with CTRL+ALT+F1. Then login to your normal desktop user account.

Your GID & UID should both now be 1000, but it won't hurt to double check on everthing.

Check that the UID/GID and file ownerships for your user account has been reset properly:

ls -l /home/$USER
id -u ls -l /home/$USER
id -g ls -l /home/$USER
grep $USER /etc/passwd
grep $USER /etc/group
3 Likes

SUCCESS!!!!!!!
Thanks a lot for all the help.
I bookmark this forum page in case in the future I end up with similar problem.
I've never seen such a beautiful implementation of plasma like this garuda flavor. Tomorrow, I install gnome on a different partition to see how it looks like. Probably, I will have to go through the same procedure changing UID and GID like with KDE.
Thanks a lot once again.

3 Likes