Author Topic: Help with virtualbox shared folder permissions for Zentyal users/groups  (Read 1784 times)

Barrydocks

  • Zen Warrior
  • ***
  • Posts: 139
  • Karma: +4/-0
    • View Profile
Really need some help to get the permissions sorted for Zentyal users on the guest OS to access the shared folders.

Here's the scenario:
Host: Ubuntu Server 10.04 LTS 64 bit with Virtual box 4.2.6
Guest: Ubuntu Server 10.04 LTS 32bit with Zentyal 2.2 & Guest Additions installed

I have a directory on the host shared with the guest. I want to use the shared folder as a smb share for the guest users. Permissions on the host directory are 777. Permissions on the guest VB shared folder are 770, owned by user root and group vboxsf - I can't change this.

As you know the users on the guest are authenticated via ldap and all belong to the Zentyal ldap group __USERS__

My question is, how do I add the Zentyal ldap group __USERS__ to the local group vboxsf to allow them to access the shared directory? Alternatively, is there an automagical way to add new Zentyal users to the vboxsf group?

Thanks

Also posted this on the ubuntu forums: http://ubuntuforums.org/showthread.php?t=2143616

jbahillo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1444
  • Karma: +77/-2
    • View Profile
If you want to share another samba daemon share to the users of you zentyal server, I guess the best option could be mounting through fstab(with a user with full permissions) that share into a folder in zentyal and then creating a share in zentyal that allows your zentyal users to access that folder.

Would it make sense for you?

keep in mind that i'm not sure of the possible side effects if you apply any acl of any kind to that folder

Barrydocks

  • Zen Warrior
  • ***
  • Posts: 139
  • Karma: +4/-0
    • View Profile
jbahillo, thanks for the reply.  That does make sense but it's not what I am trying to achieve.  What I wanted to do was share a dir on the host with the zentayl guest (which is also the smb server) and then use the shared folder on the zentyal guest a path for samba.

jmituzas

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +1/-0
    • View Profile
    • Ubuntu Forums Profile
on host

try this

Code: [Select]
#sudo bash
#nano -w /etc/samba/samba.conf
make sure you have this all setup

Code: [Select]
[global]

# set YOURWORKGROUP to the name of your workgroup

workgroup = YOURWORKGROUP
netbios name = server
server string = somethingthatmakessense
security = share
encrypt passwords = yes
guest account = guest


#Add this to bottom
path=/shared_directory
writeable=yes
browsable=yes
available = yes
valid users = USERNAME
read only = no
public = yes

don't forget to restart samba:

#sudo /etc/init.d/samba restart


on Zentyal guest I would recommend this:

Code: [Select]
apt-get install cifs-utils
create the directory where you want to mount your share at

Code: [Select]
mkdir /mymounts/sharename
edit the /etc/fstab file

Code: [Select]
//IPaddress or Domain Name/sharename /mnt/homeserver cifs username=jon,password=password,iocharset=utf8,mode=0777,dir_mode=07‌​77 0 0
run command mount -a

hope this works for you.