Samba share on Linux VM
Samba share on Linux VM
Hello everyone, I am having problem where I have a samba share on a shared folder on my Ubuntu VM. When I create a samab within the virtual hdd everything works fine. When I created a shared folder on another hdd in my pc I can create a new folder within the windows host I cannot rename it or delete it. If i go into the linux os I can delete it. If I ssh in to my vm I can delete the folder. I cannot delete it from the windows host though. Can anyone assist?
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Samba share on Linux VM
Why do you think VirtualBox is relevant to your question? If you have a working SAMBA share then that's a straight up networking solution and VirtualBox doesn't have anything to do with it, so nothing you can or can't do with it are VirtualBox issues either.
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: Samba share on Linux VM
Just want to add in, you must have the right kind of network for shared/samba folders to be seen & usable. You have a network because you can SSH into the guest. But If the guest is set to NAT then at least ports must be opened. (I don't know which ports, or if there are appropriate ports to share/samba through a NAT router.)
Use Bridged, if you're on a wired LAN (Wi-Fi might or might not work too) and want the guest and its shared folders to be on the LAN. Use Host-Only to just allow the guest and host to have a private "wired" Ethernet network. Over either of these networks, shared & samba folders should work just fine. If you can ping at least one way over the network, then the network is functioning, and as Mpack said, any inabilities to manipulate the contents of the shared/samba folder thereafter are due to settings in the host and guest OS's, not Virtualbox.
Use Bridged, if you're on a wired LAN (Wi-Fi might or might not work too) and want the guest and its shared folders to be on the LAN. Use Host-Only to just allow the guest and host to have a private "wired" Ethernet network. Over either of these networks, shared & samba folders should work just fine. If you can ping at least one way over the network, then the network is functioning, and as Mpack said, any inabilities to manipulate the contents of the shared/samba folder thereafter are due to settings in the host and guest OS's, not Virtualbox.
Re: Samba share on Linux VM
Seems like it has something to do with the shared folder and vboxsf or something like that. I can manipulate it from within the vm but cannot manipulate from the host. I have been using google and I think it may have something to do with the mask/umask virtualbox uses when it mounts it auto mounts the folder. I have been walked through manual mounting but have had no success with being able to delete the folders I create from the windows host. I can't change the permissions on the shared folder.
-
Martin
- Volunteer
- Posts: 2562
- Joined: 30. May 2007, 18:05
- Primary OS: Fedora other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: XP, Win7, Win10, Linux, OS/2
Re: Samba share on Linux VM
Virtualbox shared folders are not designed to be used by programs or access methods which need access control and advanced file locking.
They are just for simple file copy transfer between guest and host.
So it's no wonder that you get problems trying to give access to a shared folder with a file sharing service like samba.
They are just for simple file copy transfer between guest and host.
So it's no wonder that you get problems trying to give access to a shared folder with a file sharing service like samba.
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Samba share on Linux VM
You're trying to share a share? That rarely works out well IME.
Re: Samba share on Linux VM
Hello, I found that out first-hand. Oh well. Is looking to pass HDD through to the vm a better way to do it? I have a spare drive and don't mind it being used exclusively by the guest OS.Martin wrote:Virtualbox shared folders are not designed to be used by programs or access methods which need access control and advanced file locking.
They are just for simple file copy transfer between guest and host.
So it's no wonder that you get problems trying to give access to a shared folder with a file sharing service like samba.
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: Samba share on Linux VM
Consider the Virtualbox guest as a second PC next to your real PC. If you wanted the second PC to access the first PC's data you would need a network. To set up a network between the guest and host use Bridged or Host-Only as recommended above.
Attaching a physical disk to a guest is called raw disk access. The manual discusses it. It is an expert-only feature and can kill your data if done wrong. It would be better to figure out the network.
Attaching a physical disk to a guest is called raw disk access. The manual discusses it. It is an expert-only feature and can kill your data if done wrong. It would be better to figure out the network.