Sharing Permissions for Shared Folders in VirtualBox on Windows 10 and Ubuntu 20

Abstract: Resolve permission errors for VirtualBox shared folders on Ubuntu by adding users to the vboxsf group or adjusting mount options.

Created: 2026-08-24 by
To share folders between a Windows 10 host and an Ubuntu 20 guest in VirtualBox, you must enable the feature in VM settings, install Guest Additions for seamless integration, and configure Linux permissions manually. By default, mounted shares are owned by root with restricted access. You can resolve this by adding your user to the vboxsf group or adjusting mount options to assign ownership directly during the mounting process. This ensures read-write access without security compromises.

Configuring Shared Folders in VirtualBox Settings

The first step involves telling VirtualBox which directories from your Windows 10 host should be visible to the Ubuntu 20 guest. Open the VirtualBox Manager, select your Ubuntu virtual machine, and click on Settings. Navigate to the Shared Folders category in the left-hand menu. Click the icon to add a new shared folder entry. In the dialog box that appears, use the folder path button to browse your Windows host file system and select the directory you wish to share. Enter a descriptive name for the share; this is the identifier used within the Linux guest, not the Windows path. Check the Auto-mount box if you want the folder to appear automatically upon boot. It is often safer to uncheck Make Permanent while testing to avoid configuration clutter. Finally, ensure Read-only is unchecked if you intend to write files from the Ubuntu guest to the Windows host. Click OK to save these settings. This action prepares the environment but does not yet grant the Linux user access to the data.

Installing VirtualBox Guest Additions

Shared folders rely heavily on the VirtualBox Guest Additions, which provide drivers and system applications for optimal performance. Without these additions, the shared folder may not mount correctly, or performance will be severely degraded. Start your Ubuntu 20 guest and open a terminal. Update your package lists by running sudo apt update. Then, install the necessary build tools and kernel headers required to compile the guest modules using sudo apt install build-essential dkms linux-headers-$(uname -r). Once the dependencies are installed, insert the Guest Additions CD image by selecting Devices > Insert Guest Additions CD Image from the VirtualBox menu bar. Mount the CD and run the installation script. Alternatively, you can install them via the repository by running sudo apt install virtualbox-guest-additions-iso followed by the standard installation commands. After installation, reboot the virtual machine. This step is critical because it enables the vboxsf filesystem driver that allows Ubuntu to interpret the shared folder structure provided by the Windows host.

Fixing Permission Errors in Ubuntu

Even with correct configuration, you might find that you cannot create, delete, or modify files in the shared folder due to permission restrictions. The shared folder is typically mounted under /media/sf_YourShareName. To check who owns this directory, use the command ls -ld /media/sf_YourShareName. By default, the owner is root and the group is vboxsf, with permissions that deny access to regular users. There are two primary methods to fix this. The first method involves adding your current user to the vboxsf group. Run sudo usermod -aG vboxsf $USER. Log out and log back in for the group change to take effect. This grants your user access to all shared folders managed by VirtualBox. The second method is more granular: you can specify the UID and GID of your user when mounting the folder manually. Create a custom mount point, such as mkdir ~/shared, and then mount the share using specific flags: sudo mount -t vboxsf YourShareName ~/shared -o uid=$(id -u),gid=$(id -g). This approach gives your user direct ownership of the specific mount point, bypassing the global group restriction.

Verifying Read-Write Access

After applying the permission fixes, verify that the setup works correctly. Navigate to the shared folder location using cd /media/sf_YourShareName or your custom mount point. Try creating a test file using touch testfile.txt. If the command succeeds, the permissions are correctly configured. You can also try copying a file from your Windows host into the folder to ensure bidirectional communication is stable. If you encounter errors such as "Permission denied" despite being in the vboxsf group, ensure that the Auto-mount option was enabled in the VirtualBox settings. Additionally, check the VirtualBox logs located in the VM's directory for any mounting errors. For persistent issues, consider checking if SELinux or AppArmor policies are interfering, though this is rare in standard Ubuntu desktop installations. Properly configured shared folders provide a robust bridge for development workflows, allowing you to edit code on Windows while running tools in Linux. For more complex virtualization setups, such as nested environments, see how to handle nested virtualization issues in VirtualBox.

Frequently Asked Questions

Why is my shared folder showing as empty?

This usually happens if the Guest Additions are not installed or if the auto-mount failed. Ensure the vboxsf module is loaded by running lsmod | grep vboxsf. If it is missing, reinstall the Guest Additions and reboot the VM.

Can I share multiple folders at once?

Yes, you can add multiple entries in the Shared Folders settings panel. Each entry will be mounted separately under /media/sf_ followed by its unique share name. Apply permissions to each mount point individually if needed.

Do shared folders work over a network?

No, VirtualBox shared folders operate locally within the hypervisor layer. They do not use SMB or NFS protocols accessible from outside the VM. For network sharing, you must configure a network adapter type like Bridged or NAT in the VM settings.

What if I get a "Mount Error" on boot?

This indicates a mismatch between the host share name and the guest expectation. Check the VirtualBox settings to ensure the share name matches exactly what you typed in the mount command. Also, verify that the host folder still exists at the specified path.

Is it safe to write large files to shared folders?

Writing large files is generally safe but can impact performance due to the overhead of the virtual file system interface. For heavy I/O operations, consider using a virtual disk image attached to the VM instead of a shared folder for better speed and reliability.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More