Permission error after resting backup on a new ssd

What type of hardware are you using: Raspberry Pi 3, 4+
What YunoHost version are you running: 12.0.17
How are you able to access your server: The webadmin
SSH
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: no

Describe your issue

After restoring the backup and having a ssh access I see this warnings:
Could not chdir to home directory /home/adminuser: Permission denied
-bash: /home/adminuser/.bash_profile: Permission denied

Share relevant logs or error messages

Could not chdir to home directory /home/adminuser: Permission denied
-bash: /home/adminuser/.bash_profile: Permission denied

What does ls -ld /home/adminuser return ?

1 Like
adminuser@hostname:/$ ls -ld /home/adminuser
drwxrwxr-x+ 4 59388 59388 4096 Jul 18 03:00 /home/adminuser

I may know what happened, before restoring the back-up I setup an unser with local domain. I set up the user with the same “adminuser” as the current adminuser name of my restored backup, and it seems to be using the “temporary” same name admin user instead of the one restored from my backup.

I think this created an identity conflict. Check the GID and UID of adminuser. I would reassign the rights to adminuser on his home directory…

a simple sudo chown -R adminuser /home/adminuser/ solved it.