Shared folder between Windows and Fedora in VirtualBox — Guest Additions, vboxsf and the “Permission denied” you will almost certainly get
Once Fedora is running in VirtualBox, the next thing you need is to move files between Windows and Fedora without hassle. In IC2 it’s essential: you write and compile your code in Fedora, but you want it on Windows too to back it up, upload it to the virtual campus or hand it in.
In this guide we set up the shared folder between Windows and Fedora step by step. I’ll warn you from the start: installing the Guest Additions on Fedora 43 wasn’t as easy as on other versions. I had to solve several errors before getting there, and in one of the steps Fedora’s servers took more than an hour. Everything is here so you don’t go through the same, and I’ll also show you a shorter road that on Fedora 44 should save you almost all of it. If you don’t have the virtual machine yet, start with how to install Fedora on VirtualBox.
Table of Contents
What you need before you start
- The Fedora virtual machine from the previous guide, running and logged in.
- Internet inside Fedora (open Firefox in the VM and check a page loads). VirtualBox provides it by default with its NAT network.
- Your Fedora user password:
sudowill ask for it several times. - Patience with
dnf: the first package installation can be slow.
The screenshots come from my real installation with Fedora 43 (March-April 2026). I reviewed the steps in October 2026 against the VirtualBox 7.2 documentation and the Fedora 44 packages, but what happens inside VirtualBox I couldn’t repeat for this update. The permissions part, on the other hand, I really ran (I’ll explain how when we get there).
What are Guest Additions?
The Guest Additions are a set of drivers and programs installed inside the virtual machine so it can talk to VirtualBox and Windows. Without them:
- There are no shared folders (the driver that mounts them,
vboxsf, is part of the Guest Additions). - The screen doesn’t resize when you change the window size.
- The shared clipboard and drag and drop don’t work, and the mouse integrates worse.
Look at the path a file takes: it’s the same folder seen from two systems, and the Guest Additions are the last stretch of the bridge.
Notice the last line in the Fedora box, root:vboxsf rwxrwx---: it’s the culprit behind the permissions error we’ll see later.
Before anything else: do you already have them?
Fedora keeps a Guest Additions package in its repositories (virtualbox-guest-additions, version 7.2.20 on Fedora 44), and the basic drivers already ship inside the Linux kernel. That’s why, on a recent Fedora Workstation installation, they may already work without doing anything. Check before installing anything:
rpm -q virtualbox-guest-additions lsmod | grep vbox getent group vboxsf
- If the first command returns a package name (
virtualbox-guest-additions-7.2.…fc44…), the package is installed. - If the second shows lines with
vboxguestandvboxsf, the drivers are loaded. - If the third returns a line like
vboxsf:x:…:, the group exists.
If the package isn’t there, the short road is installing it from Fedora’s repositories and rebooting:
sudo dnf install virtualbox-guest-additions sudo reboot
I couldn’t test this short road on a Fedora 44 for this guide (on Fedora 43 I went through the VirtualBox CD in part 1). If after rebooting the window resizes by itself and the third command above returns the vboxsf group, skip part 1 and go straight to part 2.
Installing both versions at once: Fedora’s package and the ones from the VirtualBox CD. They step on each other and it’s easy to end up with drivers that won’t load. Pick one road: if you use the CD in part 1, first remove the package with sudo dnf remove virtualbox-guest-additions.
Part 1 — Install Guest Additions in Fedora
This is VirtualBox’s “official” road, the one I followed. With Fedora running and on the desktop, go to the VirtualBox window menu (the bar at the top, outside Fedora) and click:
Devices → Insert Guest Additions CD image…

Fedora will detect the virtual CD and may ask whether to run it: click Run. If no prompt appears, open Files (Fedora’s file manager): you’ll see a mounted device called VBox_GAs_7.2.…. Click the three-dots menu and choose Run in a terminal (or open a terminal and follow step C below).

It will ask for your Fedora password. Type it (nothing appears while you type: that’s normal in Linux). The installation takes a couple of minutes.

When it finishes you’ll see a message saying the installation succeeded. Reboot the virtual machine:
sudo reboot
When it comes back, if you resize the VirtualBox window and the Fedora desktop adapts by itself, the Guest Additions are working. You can jump to part 2.
If installation fails — the real process on Fedora 43
On my Fedora 43 the automatic installation failed with a kernel modules error. The reason: the Guest Additions from the CD have to compile their drivers for your exact Linux kernel version, and that needs a compiler (gcc), make, perl and the kernel headers (kernel-devel), which Fedora Workstation doesn’t ship.
The fix is installing them by hand. Open Fedora’s terminal and follow these steps in order:
Step A — Clean the dnf cache
dnf is Fedora’s package manager. Before installing anything, clean its cache to avoid checksum errors from half-downloaded data:
sudo dnf clean all
Step B — Install the required dependencies
sudo dnf install -y kernel-devel gcc make perl
The -y answers “yes” to the installation question. This step was the one that drove me mad: Fedora 43’s mirrors were painfully slow and kept timing out. dnf retries by itself, and in my case it took more than an hour. Don’t cancel even if you see errors in red: if the process keeps moving, it’s working.

The most common failure here is that the kernel-devel dnf installs doesn’t match the kernel you’re running (it happens if Fedora installed a new kernel and you haven’t rebooted yet). There are two ways around it:
sudo dnf install -y kernel-devel-$(uname -r) sudo dnf install -y kernel-devel --allowerasing
The first asks for exactly your kernel’s headers ($(uname -r) is replaced by its version); the second is the one that worked for me, because it lets dnf swap conflicting packages. If neither works, update everything with sudo dnf upgrade, reboot and start again from step B: that way the kernel and its headers end up on the same version.

Step C — Run Guest Additions with sudo
With the tools installed, launch the CD installer again, this time yourself from the terminal and as administrator:
sudo /run/media/sergiomedinaospina/VBox_GAs_*/VBoxLinuxAdditions.run
Replace sergiomedinaospina with your Fedora username: Fedora mounts CDs under /run/media/<your user>/. The * saves you from typing the CD’s version number.

Step D — If modules still won’t load
If after rebooting the screen still doesn’t resize, ask the Guest Additions to rebuild their modules:
sudo /sbin/rcvboxadd quicksetup all sudo reboot
The VirtualBox 7.2 documentation also gives sudo /sbin/rcvboxadd setup (builds the modules for the current kernel) and a way to check the status without guessing: sudo /sbin/rcvboxadd status-kernel tells you whether the drivers are loaded and whether they match the installed version.

When Fedora boots again, the screen will fit the VirtualBox window. That confirms the Guest Additions are working.
Part 2 — Create the shared folder in Windows
Before configuring anything in VirtualBox you need the folder on Windows. Open File Explorer and create it somewhere sensible:
C:\Users\YourName\Shared_IC2
Give it a name without spaces, accents or special characters (Shared_IC2, not Shared IC2 (labs)): in Linux every space has to be escaped in the terminal, and you save yourself trouble.
Avoid creating it inside a folder synced with OneDrive (like Desktop or Documents, if they’re in OneDrive). It works, but OneDrive may leave “online-only” files that Fedora sees as size 0 or can’t open.
Part 3 — Configure the shared folder in VirtualBox
With the virtual machine completely shut down, select it in VirtualBox and click Settings → Shared Folders. Click the folder icon with the + and fill in the dialog:
| Field | Value | Why |
|---|---|---|
| Folder Path | C:\Users\YourName\Shared_IC2 | The Windows folder from part 2 |
| Folder Name | Shared_IC2 | The name Fedora will see |
| Read-only | Unticked | You want to write from Fedora |
| Auto-mount | Ticked | So Fedora mounts it by itself on boot |
| Mount point | Empty | So it uses the usual one: /media/sf_<name> |
| Make Permanent | Ticked | Essential so it’s still there every time you boot |
Accept twice and start the VM.
Part 4 — Access the folder from Fedora
The folder should show up by itself in the file manager’s left panel. If it doesn’t, look for it from the terminal:
ls /media/sf_Shared_IC2
VirtualBox mounts automatic shared folders under /media/, with the sf_ (shared folder) prefix in front of the name you chose. And here, almost certainly, comes the error.
The permissions error — almost certain to happen
When you try to open the folder you’ll get a permissions error (in the file manager, a padlock or “You do not have the permissions”; in the terminal, Permission denied). It’s normal: the mounted folder belongs to the root user and the vboxsf group, with rwxrwx--- permissions. In other words, only root and members of the vboxsf group get in, and your user isn’t in that group by default.
To show you the real output, I reproduced it on a practice Linux with the same permissions VirtualBox sets (a /media/sf_Shared_IC2 folder owned by root, group vboxsf, 770) and a user sergio who, as on Fedora, is in the administrators’ wheel group. It isn’t a real VirtualBox, but ls, id and usermod answer exactly the same. This is the session, run once:
$ id -nG sergio wheel $ ls /media/sf_Shared_IC2 ls: cannot open directory '/media/sf_Shared_IC2': Permission denied $ sudo usermod -aG vboxsf sergio $ id -nG sergio wheel $ ls /media/sf_Shared_IC2 ls: cannot open directory '/media/sf_Shared_IC2': Permission denied
What happens, line by line:
id -nGlists your session’s groups:sergio(yours) andwheel. No trace ofvboxsf.- That’s why
lsfails: root and the group haverwx, but “everyone else”, which is you, has---. sudo usermod -aG vboxsf sergioappends you (-a) to the group (-G)vboxsf. It says nothing: in Linux, silence is success.- And here’s the trap:
id -nGis still the same andlsstill fails. A user’s groups are read at login; your current session started before the change.
Replace sergio with your user (or type $USER, which Linux replaces with your username: sudo usermod -aG vboxsf $USER). Then reboot:
sudo reboot
The diagram sums up the three situations in the session:
Forgetting the -a. sudo usermod -G vboxsf sergio (without -a) replaces all your groups with vboxsf, and you lose wheel… and with it the right to use sudo. Always type -aG.
What if usermod answers this? I triggered it in the same lab before creating the group:
$ getent group vboxsf $ echo $? 2 $ sudo usermod -aG vboxsf sergio usermod: group 'vboxsf' does not exist
getent group vboxsf returns nothing (and echo $? gives 2: “not found”), and usermod complains that the vboxsf group doesn’t exist. That group is created by the Guest Additions when they install, so this error means the Guest Additions aren’t installed (or the installation half-failed). Go back to “Before anything else: do you already have them?” or to part 1.
Final verification — check it works both ways
After rebooting, check the folder works in both directions. In the lab, with a new session (which is what the reboot gives you) and a file created “from Windows”, this came out:
$ id -nG sergio vboxsf wheel $ ls -l /media/sf_Shared_IC2 total 4 -rwxrwx--- 1 root vboxsf 19 Oct 26 19:57 hello_from_windows.txt $ touch /media/sf_Shared_IC2/test_from_fedora.txt $ ls /media/sf_Shared_IC2 hello_from_windows.txt test_from_fedora.txt
- Now
id -nGdoes showvboxsf: the new session read the groups again. ls -llists the Windows file: ownerroot, groupvboxsf,rwxrwx---. In a VirtualBox shared folder every file looks like this, even the ones you create; don’t panic. The date and time will be yours.touchcreates an empty file from Fedora, and the lastlsshows both.
In your VirtualBox, do the same for real: create a file from Windows in Shared_IC2 and check it shows up with ls /media/sf_Shared_IC2; then create one from Fedora with touch /media/sf_Shared_IC2/test_from_fedora.txt and look for it in Windows Explorer. If it appears on both sides, the setup is complete.

In the lab ls prints one file per line because its output wasn’t going to a terminal window. In your Fedora terminal you’ll see them side by side.
Commands summary — copy this and keep it handy
# 0. Do I already have the Guest Additions? (package, modules and group) rpm -q virtualbox-guest-additions lsmod | grep vbox getent group vboxsf # 1. Short road: Fedora's package sudo dnf install virtualbox-guest-additions # 2. CD road (if you don't use the package): dependencies sudo dnf clean all sudo dnf install -y kernel-devel gcc make perl sudo dnf install -y kernel-devel-$(uname -r) # if it doesn't match your kernel sudo dnf install -y kernel-devel --allowerasing # the alternative that worked for me # 3. Run the Guest Additions from the CD (change yourusername) sudo /run/media/yourusername/VBox_GAs_*/VBoxLinuxAdditions.run # 4. If the modules don't load sudo /sbin/rcvboxadd quicksetup all sudo /sbin/rcvboxadd status-kernel # 5. Join the vboxsf group (with -a) and reboot sudo usermod -aG vboxsf $USER sudo reboot # 6. Check id -nG ls /media/sf_Shared_IC2
Tip for IC2 — organise your shared folder from day one
Shared_IC2/ ├── Labs/ │ ├── P1_introduction/ │ └── P2_pointers/ ├── Notes/ └── Submissions/
That way everything is reachable from Windows and Fedora, with a copy on your Windows disk even if you delete the VM, and organised so you can find any lab in seconds.
Common problems
usermod: group 'vboxsf' does not exist. The Guest Additions aren’t installed (they’re what creates the group). Go back to “Before anything else” or to part 1.
Permission denied when opening the folder. You’re not in the vboxsf group, or you are but haven’t rebooted. id -nG tells you which.
The folder doesn’t appear in /media. Check in VirtualBox that you ticked Auto-mount and Make Permanent. If not, shut down the VM, edit the folder and tick them. If they’re ticked, the Guest Additions haven’t loaded: lsmod | grep vboxsf will return nothing.
The folder appears but it’s empty. The Windows path isn’t right (VirtualBox keeps the old path if you moved or renamed the folder) or the files are OneDrive “online-only”.
Fedora’s servers are very slow or time out. It happened to me on Fedora 43: sudo dnf clean all and try again. Be patient; it can take more than an hour on a clean install.
The Guest Additions from the CD fail with a kernel modules error. gcc, make, perl or a kernel-devel for your exact version is missing: step B (with kernel-devel-$(uname -r) or --allowerasing) and then sudo /sbin/rcvboxadd quicksetup all.
What’s next?
| Piece | What it does | How to check it |
|---|---|---|
| Guest Additions | Integration drivers (vboxguest, vboxsf) | lsmod | grep vbox |
| Folder on Windows | C:\Users\YourName\Shared_IC2 | File Explorer |
| VirtualBox shared folder | Auto-mount + Make Permanent | Settings → Shared Folders |
vboxsf group | Lets you into /media/sf_Shared_IC2 | id -nG |
Three ideas to take away:
- Without Guest Additions there’s no shared folder: they bring the
vboxsfdriver and thevboxsfgroup. - The mounted folder belongs to root:vboxsf with
rwxrwx---: to get in you must be in the group. - Groups are read at login: after
usermod -aG, reboot.
With the shared folder working you have a complete environment between Windows and Fedora. The next step is starting to program in C: install gedit in Fedora and compile with gcc. And if you want to get comfortable with the terminal, there are the basic Linux commands.
Keep goingAll Tools articlesDid this article help you? Here is how you can support SergioLearns →



