I am using virtual box with ubuntu as the guest, which has a feature to share a folder between the host and guest, which is located for the guest in the media folder under root.

It is quite troublesome to sudo every time to perform any action on it. I respect sudo and would like to keep root away from the user, however, is there a way to give user access to a particular root folder without sudo'ing' all the time?


You can use chown to change ownership of a folder. For example, sudo chown stephen /media.

That being said, I think you can also mount the shared folder in your own home directory as well.


Open a terminal and run sudo chown -cR $USER:$(id -gn $USER) /path/to/folder.


In this case chown does not allow a particular user to take ownership since the virtual box shared folders falls under a particular user group (made by vbox) and I found the details here, with the solution https://www.virtualbox.org/ticket/7951

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.