In this article we will see how to create a folder which will be shared between host machine OS and your guest machine OS. Tn this way you can easily access files between two machines. Here the host machine OS is Windows and the guest machine OS is Ubuntu. VirtualBox is installed in Windows OS.
Create a shared folder in VirtualBox
Open the VirtualBox app and select your guest OS and select Settings.
Then select Shared Folder and click Adds new shared folder icon from right side of the window or right click on the empty space and select Add shared folder under Machine Folder.
Then click the drop down icon under Folder Path and select the folder path . And name the Folder under Folder Name and check the Auto-mount and Make Permanent.
Now restart the guest OS Ubuntu and also the VirtualBox.
Access a Shared Folder in VirtualBox:
Now in the VirtualBox start the guest OS Ubuntu and open the files app in Ubuntu. Now you will get sf_Folder name in your sidebar. Just open it. Here you can share files. Just copy paste files in this folder to share.
If you get any Permission error then open the terminal app in Ubuntu (ctrl+alt+t) and run this command.
sudo usermod -aG vboxsf <yourusername>
Just replace <yourusername> with the real Ubuntu username. For me its manikandan.
sudo usermod -aG vboxsf manikandan
Restart the guest OS Ubuntu and now try again to access.