Solve the problem that the virtualbox shared folder does not have access rights

insert image description here

Use Virtualbox to build a Linux virtual machine on a Windows host. The most convenient way to transfer files between the virtual machine and the host is to share folders.

However, when setting up for the first time, there are often problems of not being able to access. (Insufficient permissions)

correct way

If you use the share folder under Windows as a shared folder.

The mounted location is: /home/name/sf_share.

But when entering the folder, the reason for the system prompt is insufficient permissions (Permission denied).

Check the properties of the shared folder under the virtual machine, and find that the owner of the directory is root, and the group it belongs to is vboxsf.

Generally speaking, the user we log in and the group it belongs to are (your user name), so there is really no permission.

Here you need to execute some commands to elevate your privileges.

The specific method is as follows:

Execute the following command:
sudo usermod -aG vboxsf $(whoami)

The meaning of usermod:
usermod -aG <group> <user>
add users to (append to) the group, where the option [-aG] means append to the group.

Then restart the virtual machine system , and then enter the system, the shared folder can be used normally.

_

Good day, start with code.

insert image description here

Guess you like

Origin blog.csdn.net/u012739527/article/details/127529605