Samba & Virtualbox

BigAl-sa

Executive Member
Joined
Dec 26, 2006
Messages
6,652
I'm looking for help from the collective brains' trust here. I have become very frustrated with the speed of Vbox's shared folders with large files, so I got Samba up and running yesterday. However, a problem I have is that I can't write to the guest's shared folders from Linux. Everything else is working fine. It's definitely a permissions issue from the Linux side which I can't change.

I mount the XP folder:
sudo mount -t cifs "//ip address/SharedDocs" "/media/VBox-XP"
and I can read the folders and their contents with no problems, but not write to them. Permissions are 755, but no matter what I do I can't change them to 777. If I unmount the shared folder, I can change the permissions to 777, but as soon as I remount it, it drops back to 755. (Of course, root can copy files with no problems.)

Any ideas??
 

The_Unbeliever

Honorary Master
Joined
Apr 19, 2005
Messages
103,196
...and if you share the folders from within the virtual session itself?

Keep in mind that in some cases samba might require an username and password to login - Windows, will, by default, send the currently logged in user's username and password as login credentials.

In some cases you'll need to add a password to said account to enable read/write access.
 

BigAl-sa

Executive Member
Joined
Dec 26, 2006
Messages
6,652
...and if you share the folders from within the virtual session itself?

Keep in mind that in some cases samba might require an username and password to login - Windows, will, by default, send the currently logged in user's username and password as login credentials.

In some cases you'll need to add a password to said account to enable read/write access.
thanks for responding. Everything is working from the windows side, it asks for the Linux username and password when needed. The problem is from Linux to windows. I've managed to find a workaround by using the following:

I first changed the owner of VBox-XP to ME, but when I mount the share using the command above, permissions changes to 755 with root as the owner. When I unmount, ME becomes owner again. If I then mount with the following command

sudo mount -t cifs //ip address/SharedDocs /media/VBox-XP -o guest,uid=ME

In /media, VBox-XP remains owned by ME and I can write to windows from the host. It's definitely something to do with passwords (I don't have a password on the XP guest). I'll look into it some more, sometime.
 
Last edited:

MyWorld

Executive Member
Joined
Mar 24, 2004
Messages
5,001
If your permissions on the XP box are right (right click properties- yadda yadda) you can try this:
sudo mount -t cifs "//ip address/SharedDocs" "/media/VBox-XP" -o dir_mode=0777,file_mode=0777
 
Top