Are you running Ubuntu as a virtual machine through VirtualBox? You may encounter permission issues to access the shared folder between the host and guest.
Shared folders are a useful feature for file synchronization between the Virtualbox host and the guest operating system. However, after creation, the shared folder will display a cross icon and a lock icon. Also, when I try to open it, an error dialog is displayed.
Unhandled error message: GDBus.Error: org.freedesktop.PolicyKit1.Error.Failed: The Unix process subject does not have a uid set.
Alternatively, you can see permission issues when accessing from the left pane of the file manager.
You do not have the necessary permissions to view the contents of “xxx”
Fixes shared folder permissions issues.
Shared folders belong to
vboxsf A group of guests. All you need to do is add your users to this group.
There are several ways to add users to a group. Here we do it with one command.
- First, start the virtual machine and log in.
- Open a terminal window from the System App Launcher.
- When the terminal opens, run the command to see your username in case you don’t remember it.
- Finally, add the user to the vboxsf group (replace USER_NAME with the one output by the last command).
sudo adduser USER_NAME vboxsf
Reboot the VM to apply your changes and have fun!