Search code examples
linuxubuntusystem-administration

How to regain access to home folder after changing group on own VM?


How do I regain access to my home folder?

I was trying to get shared folders to work in VirtualBox and I changed the user group to vboxsf by invoking

sudo usermod -a -G vboxsf dev

I rebooted then I lost access to /home/dev, the home user folder.

I tried to fix it but it did not work. The changes do not get persisted!!

enter image description here

I own the VM. How do I fix this?


Solution

  • The solution is simple. Just change the ownership of the folder "/home/dev"

    you can do this by chown command:

    sudo chown -R vboxsf:vboxsf /home/dev
    

    and then your ownership and group will be changed from root to vboxsf