Can't do anything with files in shared folders (Linux Guest)

Discussions about using Linux guests in VirtualBox.
Post Reply
WolfyRed
Posts: 14
Joined: 8. Apr 2023, 22:06

Can't do anything with files in shared folders (Linux Guest)

Post by WolfyRed »

So, I have created a Shared Folder in my Linux Guest, and then I went into the Shared Folder on Linux. Linux OS gave a pop-up about permissions, and how I can't access the folder. So, I checked what I could do, and found "the solution". I executed the linux code needed to access it from the Linux OS, which is right here:

Code: Select all

mount -t vboxsf <shared_name> mountpoint
I replaced the folder name with the <shared_name> with the shared folder name I created, obviously, and it still gave the same exact error pop-up. I turned off the Guest machine, and turned it back on, check to see if there were any changes, still nope.

I ran the shared folder as root, which got rid of the pop-up about permissions, so I assumed I could go and do stuff with the files in the shared folder. After trying to save changes I made, it gave me another error pop-up, and the changes were not saved. The only thing I can do with the shared folder on the Linux Guest machine was create new files, and that's it.

I even tried to add myself to the "vboxsf" group from the Linux, and it got rid of more of the pop-ups about permissions when opening the shared folder from the files app, but it wouldn't remove the permissions pop-up I get whenever I try making changes to files in the shared folder.

What in the world am I supposed to do?

VirtualBox version : 7.0.6 r155176 (Qt5.15.2)

Host: Windows 10

Guest: Linux Mint

Oracle VM VirtualBox Extension Pack installed on Host
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Can't do anything with files in shared folders (Linux Guest)

Post by mpack »

Make sure your user is added to the vboxsf group.

Also, I assume you replaced <mountpoint> with something non-generic. Common practice in Linux is to name the mount pont "sf_"<share_name>.

I did all this just yesterday with an Ubuntu VM, so I'm pretty sure it works. No write permissions problems writing to the folder, assuming of course that you have write access to that folder on your host.
WolfyRed
Posts: 14
Joined: 8. Apr 2023, 22:06

Re: Can't do anything with files in shared folders (Linux Guest)

Post by WolfyRed »

1. How do I add user to vboxsf group? With this code?

Code: Select all

sudo usermod -a -G vboxsf <username>
..Replacing <username> with my username? Because It doesn't work.

2. I tried literally naming the Shared Folder to "share" in the VM Settings, and doing

Code: Select all

mount -t vboxsf share mountpoint
and

Code: Select all

mount -t vboxsf sf_share mountpoint
...It gave me the same error each time it was exectued: /sbin/mount.vboxsf: mounting failed with the error: No such file or directory

Also, trying to edit text files in the shared folder from the Guest Linux VM doesn't work either. It will say something like "Unexpected error: Error renaming temporary file: Text file busy"
WolfyRed
Posts: 14
Joined: 8. Apr 2023, 22:06

Re: Can't do anything with files in shared folders (Linux Guest)

Post by WolfyRed »

Hello?
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Can't do anything with files in shared folders (Linux Guest)

Post by fth0 »

I'd suggest to read 4.3. Shared Folders and to use automatic mounting.
WolfyRed
Posts: 14
Joined: 8. Apr 2023, 22:06

Re: Can't do anything with files in shared folders (Linux Guest)

Post by WolfyRed »

I did use automatic mounting. That box has been checked ever since I put it in
Post Reply