Changed my home directory permission by mistake

Hello,

I think I have changed my home directory permission by mistake (chmod command), and I don’t have access to it.

I tried different ways to recover my the directory (“mounting-chowing” in recovery mode). None of them seem to be working.

Does anybody happen to have similar experience and successfully manage it? I use a single-user machine, so I am admin+user too.

Thank you very much for sharing.

Providing your system details (what Ubuntu product & release you’re using) is always helpful.

Have you tried logging in via a text terminal? Whilst what you describe may stop a GUI login, it may not stop a text terminal login; though you didn’t specify what exact change you made.

1 Like

If you’re able to get into a terminal, sudo chmod 755 ~ sets the directory permissions back to default, if that doesn’t help could you run sudo ls -latr /home and paste the output here?

Whenever something “wonky” happens to your primary login account’s setup, depending on how serious, you can always

  • start a session using the Live ISO

  • open a terminal session then enter

sudo bash

        REMEMBER THAT YOU ARE ACTING AS ROOT

  • mount your primary disk within the Live session (suggest you use
mkdir /internal

mount -t ${fstype} ${devpath} /internal
  • make changes to the on-disk files as necessary
cd /internal/home

chmod 775 /internal/home/${userdir}
  • if changes were beyond that, you can add the “/internal” prefix to any path on your original disk to get there to make those changes.