Page 1 of 1

[solved] Problem with permissions on vboxsf media Kubuntuguest, how to fix?

Posted: 25. Jul 2016, 16:00
by boospy
Hello,

we have the problem that we find no way to set permissions on the shared folder. I know when the user is in the group vboxsf it is working fine. But us Problem is the with many clients an about 600 Users, so we can't add every user to the local group. The clients are bind to Microsoft ADS. The group vboxsf is added with right GUID to the ADS and all users are member of the group, this is also not working.
How can i set permissions to the shared folders?

Maybe there is an special option to following command:

Code: Select all

VBoxManage --nologo sharedfolder add $MACHINE  --name media --hostpath /media --automount
But we didn'd find something...

Thanks a lot

Re: Problem with permissions on vboxsf media Kubuntuguest, how to fix?

Posted: 25. Jul 2016, 16:26
by Perryg
Not with automount AFAIK. With a permanent manual mount you can specify the group to use but remember that Windows host permissions trump anything else so keep that in mind and adjust accordingly.

Re: Problem with permissions on vboxsf media Kubuntuguest, how to fix?

Posted: 25. Jul 2016, 16:50
by boospy
We triyed this too: https://www.virtualbox.org/manual/ch04. ... redfolders
You mean that?

We have done this line in FSTAB:

Code: Select all

media          /media/sf_media         vboxsf             defaults,auto     0       0
The error on auto or manual mount is:

Code: Select all

/sbin/mount.vboxsf: mounting failed with the error: Protocol error
in journal at the same time this error:

Code: Select all

Jul 25 16:45:43 kubuntu-test kernel: sf_read_super_aux err=-71
Jul 25 16:45:43 kubuntu-test kernel: sf_read_super_aux err=-71
Jul 25 16:45:43 kubuntu-test kernel: sf_read_super_aux err=-71
The vboxmanageline:

Code: Select all

VBoxManage --nologo --transient sharedfolder add $MACHINE  --name media --hostpath /media --automount

Re: Problem with permissions on vboxsf media Kubuntuguest, how to fix?

Posted: 25. Jul 2016, 17:00
by Perryg
Not really. I use standard Linux mount statements with options to control the permissions.

Code: Select all

#mount -t vboxsf -o rw,uid=1000,gid=1000 <share> <mount point>
Changing the uid to the user that actually controls the starting of the guest and gid to the group you want to allow ( hint users )

Auto mounting should still be achievable using /etc/rc.local on any *Ubuntu machine.

Re: Problem with permissions on vboxsf media Kubuntuguest, how to fix?

Posted: 25. Jul 2016, 20:50
by boospy
Did you set option in vbox for the share too?

Re: Problem with permissions on vboxsf media Kubuntuguest, how to fix?

Posted: 25. Jul 2016, 20:53
by Perryg
boospy wrote:Did you set option in vbox for the share too?
Not sure what you mean but the only thing that is done on the VBox side is to share and make it permanent ( without auto-mount )
The rest is done in the guest.

Re: Problem with permissions on vboxsf media Kubuntuguest, how to fix?

Posted: 25. Jul 2016, 22:14
by boospy
Tested here on a new guest, manual mount inside vm is working but not the permissions:

Code: Select all

mount -t vboxsf -o umask=022 Downloads /media/
Should set the permissions from media to 777, but does not work. Must i set something special options?

Supplement: Maybe it works with the group domain-user, i'll check this tomorrow.

Re: Problem with permissions on vboxsf media Kubuntuguest, how to fix?

Posted: 25. Jul 2016, 22:24
by Perryg
I sent what I use and know works.

Re: Problem with permissions on vboxsf media Kubuntuguest, how to fix?

Posted: 26. Jul 2016, 10:01
by boospy
With the mount i can use all devices with read only but permissions are:

Code: Select all

mount -t vboxsf -o rw,gid=plugdev Downloads /media/

Code: Select all

ls -l /media/usbstick_gg  root:plugdev  rwxrwxr x
I can also use audio,... all groups that are set in /etc/security/group.conf

So it should work for the group plugdev, and yes i can read, but not write

Re: Problem with permissions on vboxsf media Kubuntuguest, how to fix?

Posted: 26. Jul 2016, 14:03
by Perryg
Interesting choice. Using removable media and plugdev....

Linux handles removable media a lot different than a common share in /mnt ( common ) or ~/ ( individual user ).

Try a normal share ( not USB or other removable media ) and mount it in /mnt then give the option for users as group.

Re: Problem with permissions on vboxsf media Kubuntuguest, how to fix?

Posted: 27. Jul 2016, 17:16
by boospy
Ok, it is working now, this are my options on the Virtuablboxhost:

Code: Select all

VBoxManage --nologo --transient sharedfolder add $MACHINE  --name media --hostpath /media
And the mountcommand in rc.local

Code: Select all

sleep 15 # because of Domain availability
mount -t vboxsf -o rw,gid=domainuser media /media/
The group must be a domain or ldapgroup. Then it is working fine. Local groupmapping with winbind over securityconfig does not work.

Thanks and Best Regards