Shared folder permissions
-
TimC
- Posts: 9
- Joined: 10. Apr 2009, 12:48
- Primary OS: Ubuntu 8.04
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win98, WinXP
Shared folder permissions
I'm running VB on XP SP3 with a Ubuntu 8.04 guest.
I can successfully mount a shared folder using a command such as:
sudo mount -t vboxsf -o uid=1000,gid=1000 <sharename> <mountpoint>
The share is correctly set up on the host with full access.
If you examine the files and folders in the guest the permissions seem to be set correctly ie read and write etc. Although you can create and delete files in the folders you cant edit any of the files (as if the permissions are actually set to read only), nor if you copy an executable into the shared folder can you run it or even set the permission to allow it to run. You can move a file out of the share, edit it then put it back OK.
If you mount the folder with:
sudo mount -t vboxsf -o uid=1000,gid=1000,ro <sharename> <mountpoint>
You get the expected behaviour, in particular the folder symbol has the locked icon and you cant create files in the share
It seems the permissions you expect with the mount command are only reflected on the directories and the files within the directories maintain a read only, no execute access level.
Tim
I can successfully mount a shared folder using a command such as:
sudo mount -t vboxsf -o uid=1000,gid=1000 <sharename> <mountpoint>
The share is correctly set up on the host with full access.
If you examine the files and folders in the guest the permissions seem to be set correctly ie read and write etc. Although you can create and delete files in the folders you cant edit any of the files (as if the permissions are actually set to read only), nor if you copy an executable into the shared folder can you run it or even set the permission to allow it to run. You can move a file out of the share, edit it then put it back OK.
If you mount the folder with:
sudo mount -t vboxsf -o uid=1000,gid=1000,ro <sharename> <mountpoint>
You get the expected behaviour, in particular the folder symbol has the locked icon and you cant create files in the share
It seems the permissions you expect with the mount command are only reflected on the directories and the files within the directories maintain a read only, no execute access level.
Tim
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: Shared folder permissions
That's where the other mount options, rw,exec, come into play. That is noted in my HowTo, that there are more mount options and you have to check the man page of mount for that.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
TimC
- Posts: 9
- Joined: 10. Apr 2009, 12:48
- Primary OS: Ubuntu 8.04
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win98, WinXP
Re: Shared folder permissions
Yes, I read your HOWTO, I read the man pages for mount, rw is the default option, I tried it and it DOES NOT work which is why I posted...Sasquatch wrote:That's where the other mount options, rw,exec, come into play. That is noted in my HowTo, that there are more mount options and you have to check the man page of mount for that.
Even with the rw/and exec options and logged in as root you cant set the execute permission on an exe in the mounted folder, nor can you edit a file unless you copy it into another directory.
I'll add that I've tried it with a line in fstab and an explicit mount command:
mount -t vboxsf -o rw,exec,uid=1000,gid=1000 <share> <host>
Same results
Tim
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: Shared folder permissions
First, why the hell do you want to have a .exe be executable? It's a Windows file, incompatible with Linux. And make sure that the UID and GID are the same for your user. Using 1000 doesn't work on all systems.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
weststar43
- Posts: 8
- Joined: 23. Apr 2009, 00:58
- Primary OS: MS Windows Vista
- VBox Version: OSE other
- Guest OSses: ubuntu, opensolaris, xp,
Re: Shared folder permissions
I'm getting the same result and I have tried the same commands and options. I also am using XP as the host.
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: Shared folder permissions
Post the output of id from a terminal, and the exact mount command you're using. Then the error you get when creating a file or modifying one.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
weststar43
- Posts: 8
- Joined: 23. Apr 2009, 00:58
- Primary OS: MS Windows Vista
- VBox Version: OSE other
- Guest OSses: ubuntu, opensolaris, xp,
Re: Shared folder permissions
ubuntu@ubuntu-desktop:~$ id
uid=1000(ubuntu) gid=1000(ubuntu) groups=0(root),4(adm)[... removed for ...],1000(ubuntu)
ubuntu@ubuntu-desktop:~$ sudo mount -t vboxsf -o uid=1000,gid=1000 Linuxshare /home/ubuntu/Hostshare
[sudo] password for ubuntu:
ubuntu@ubuntu-desktop:~$
With the above mount command from the guest, I can see the files in the share, read the files in the share, and create new files in the share, but I cannot edit a file in the share. I get the error message: "Unexpected error: Text file busy".
I'm using VB 2.2 r45846 and XP Pro SP2 and the VB share is set to full access.
uid=1000(ubuntu) gid=1000(ubuntu) groups=0(root),4(adm)[... removed for ...],1000(ubuntu)
ubuntu@ubuntu-desktop:~$ sudo mount -t vboxsf -o uid=1000,gid=1000 Linuxshare /home/ubuntu/Hostshare
[sudo] password for ubuntu:
ubuntu@ubuntu-desktop:~$
With the above mount command from the guest, I can see the files in the share, read the files in the share, and create new files in the share, but I cannot edit a file in the share. I get the error message: "Unexpected error: Text file busy".
I'm using VB 2.2 r45846 and XP Pro SP2 and the VB share is set to full access.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Shared folder permissions
I have full access to my share with the following line in my fstab.
You should be able to change your mount and share point and get this working for you. After you have this you can then access the folder permissions from the file browser and tweak the settings you want.
Code: Select all
Shared /mnt/Shared vboxsf defaults,rw,uid=1000,gid=1000 0 0
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Shared folder permissions
One other thing that I should mention is Gedit has had a bug since Ubuntu 8.10 that will cause the file busy state.
Try a different editor and see if it works for you. I just retested with Ubuntu Jaunty and Vista share. Read, Write, Edit, Delete all work. Gedit still has the problem.
Try a different editor and see if it works for you. I just retested with Ubuntu Jaunty and Vista share. Read, Write, Edit, Delete all work. Gedit still has the problem.
-
weststar43
- Posts: 8
- Joined: 23. Apr 2009, 00:58
- Primary OS: MS Windows Vista
- VBox Version: OSE other
- Guest OSses: ubuntu, opensolaris, xp,
Re: Shared folder permissions
Bingo!
From eclipse I can open and edit a file on the host shared folder. gedit still gives the error. Thanks for the pointer. Got the guest additions working, screen resolution is good, file sharing is good, mouse behaves properly. I begining to like this virtual image thing.
From eclipse I can open and edit a file on the host shared folder. gedit still gives the error. Thanks for the pointer. Got the guest additions working, screen resolution is good, file sharing is good, mouse behaves properly. I begining to like this virtual image thing.
-
TimC
- Posts: 9
- Joined: 10. Apr 2009, 12:48
- Primary OS: Ubuntu 8.04
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win98, WinXP
Re: Shared folder permissions
I didnt say .exe ...Sasquatch wrote:First, why the hell do you want to have a .exe be executable? It's a Windows file, incompatible with Linux.
By exe I mean an executable file; seeing as I'm writing the code I'm pretty clear which file it is I want to execute.
Tim
-
TimC
- Posts: 9
- Joined: 10. Apr 2009, 12:48
- Primary OS: Ubuntu 8.04
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win98, WinXP
Re: Shared folder permissions
Thats more or less what I've been doing; I cant change permissions in the file browser; even though the permissions are set to read and write I cant, for example, set them to read only.Perryg wrote:I have full access to my share with the following line in my fstab.You should be able to change your mount and share point and get this working for you. After you have this you can then access the folder permissions from the file browser and tweak the settings you want.Code: Select all
Shared /mnt/Shared vboxsf defaults,rw,uid=1000,gid=1000 0 0
Dont think its the gedit bug either, I've tried with other editors.
Tim
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: Shared folder permissions
You should have been more clear about that. In Linux, you can set any file to be exectuable and calling a file 'exe' makes me think about Windows .exe files.TimC wrote:I didnt say .exe ...Sasquatch wrote:First, why the hell do you want to have a .exe be executable? It's a Windows file, incompatible with Linux.
By exe I mean an executable file; seeing as I'm writing the code I'm pretty clear which file it is I want to execute.
Tim
You can't change permissions on network shares, same thing for Shared Folders. Change the mount options to change permissions. Or set the whole SF as read-only from the GUI. Per file changes will not work.TimC wrote:Thats more or less what I've been doing; I cant change permissions in the file browser; even though the permissions are set to read and write I cant, for example, set them to read only.Perryg wrote:I have full access to my share with the following line in my fstab.You should be able to change your mount and share point and get this working for you. After you have this you can then access the folder permissions from the file browser and tweak the settings you want.Code: Select all
Shared /mnt/Shared vboxsf defaults,rw,uid=1000,gid=1000 0 0
Dont think its the gedit bug either, I've tried with other editors.
Tim
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
WilPro
- Posts: 2
- Joined: 28. Apr 2009, 00:42
- Primary OS: MS Windows XP
- VBox Version: OSE other
- Guest OSses: Kubuntu
Re: Shared folder permissions
Has anyone been able to really get a shared drive mounted as Read-Write?
I looked at all the previous posts and could not get it working. I run XP SP3 with Kubuntu 9.04 as guest and I tried various scenarios. The guest additions are installed and I followed a lot of earlier advice but to no avail!
If I look at the permissions of shared folders in Kubuntu, they show as RW but I can not copy any files to that directory or edit any files.
I created a file /etc/init.d/virtualbox that contains:
mount -t vboxsf -o uid=1000,gid=1000,rw Shared /home/user/w
where /home/user/w is my shared folder. Funny thing is that if I do a "ls -l" on the mount point before the mount, it shows as "drwxrwxrwx" but after the mount it shows as "dr-xr-wr-x". Is this right?
Please! We need some help. This should not be so difficult. I am sure that I am not the only one.
I looked at all the previous posts and could not get it working. I run XP SP3 with Kubuntu 9.04 as guest and I tried various scenarios. The guest additions are installed and I followed a lot of earlier advice but to no avail!
If I look at the permissions of shared folders in Kubuntu, they show as RW but I can not copy any files to that directory or edit any files.
I created a file /etc/init.d/virtualbox that contains:
mount -t vboxsf -o uid=1000,gid=1000,rw Shared /home/user/w
where /home/user/w is my shared folder. Funny thing is that if I do a "ls -l" on the mount point before the mount, it shows as "drwxrwxrwx" but after the mount it shows as "dr-xr-wr-x". Is this right?
Please! We need some help. This should not be so difficult. I am sure that I am not the only one.
Last edited by WilPro on 29. Apr 2009, 00:31, edited 2 times in total.
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Shared folder permissions
This is really a Linux command. And yes a lot of people have this working.
Type id in a terminal to see what your uid and gid are.
Then put the following in your fstab. and change the uid and gid to match yours.
Shared /mnt/Shared vboxsf defaults,rw,uid=1000,gid=1000 0 0
Type id in a terminal to see what your uid and gid are.
Then put the following in your fstab. and change the uid and gid to match yours.
Shared /mnt/Shared vboxsf defaults,rw,uid=1000,gid=1000 0 0