2

I have a folder on my host system (Arch Linux) which is being shared with an Ubuntu VirtualBox guest. Instead of using automount, I am mounting the folder at boot using the following line in my guest's fstab file:

sharedfolder /var/sharedfolder vboxsf rw,exec,uid=root,gid=mods,umask=0002 0 0

The folder is being mounted successfully, and with the proper owner and group, but the permissions are being shown as missing the w permission for the group.

The relevant output of ls -lh is below:

drwxr-xr-x  1 root mods 4.0K Jun  1 16:41 sharedfolder

whereas I want it to be:

drwxrwxr-x  1 root mods 4.0K Jun  1 16:41 sharedfolder

I specifically need any user belonging to the group mods to have full permissions in this folder, which is currently not happening.

I have tried using chmod 775 sharedfolder, but the permissions do not change, even when running the command with sudo.

Any advice would be most appreciated.

2 Answers 2

2

If you don't immediately understand what @sapphirecat meant... You can change /etc/fstab to something like this:

sharedfolder /var/sharedfolder vboxsf rw,exec,uid=root,gid=mods,dmode=775,fmode=664  0 0

I'm using:

share-loc-in-macos    /var/www/html/share-loc-in-debian    vboxsf   defaults,uid=1000,gid=33,dmode=775,fmode=664    0    0
2

It appears that the umask, fmask, and dmask options are applied to the default VirtualBox mode. (I'm using an OS X host, and my folders mount with drwx------ permissions, i.e., 700.)

While this can be overridden with the fmode and dmode options, those will apply to all of the files and directories, respectively, regardless of what the execute bit might have been on the host. Setting and clearing the execute bit in the guest sets or clears the bit on the host, but continues to always show as executable in the guest.

I'm not aware of any way to get the execute bit to reflect the host file's bit in the guest.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .