Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unaccessible file mounts with VirtualBox #243

Closed
elmar-hinz opened this issue Apr 21, 2017 · 2 comments
Closed

Unaccessible file mounts with VirtualBox #243

elmar-hinz opened this issue Apr 21, 2017 · 2 comments

Comments

@elmar-hinz
Copy link

elmar-hinz commented Apr 21, 2017

Another case related to access rights (Dinghy 4.5.0)

bildschirmfoto 2017-04-21 um 10 10 15

eval $(dinghy env)
export DINGHY_HOST_MOUNT_DIR=/Volumes/
export DINGHY_GUEST_MOUNT_DIR=/Volumes/

When I log in with dinghy ssh I find /Users/ElmarHinz mapped to root:root and those directories are mountable. /Volumes is mapped to the user 501:80 and is not mountable.

bildschirmfoto 2017-04-21 um 10 27 08

On my local machine both directories have the same user and group settings.

UPDATE: In another try /Users/ElmarHinz changed to 501:80, too, while I was browsing the directory.

My startup script:

https://github.com/elmar-hinz/TYPO3.docker-development/blob/master/run.sh

There is no error, but the directories are not mounted. (The script works with docker-for-mac).

Possible solution

My other Vagrant based VirtualBox sets /Volumes/ to root:root basically proving the issue is solvable.

    6             #################
    5             # NFS
    4             #################
    3             config.vm.synced_folder "#{mount['src']}",
    2                 "#{mount['target']}",
    1                 :nfs => { :mount_options => [ "dmode=775", "fmode=774" ] }

I don't know what it does different. Maybe it the trick to write to /etc/exports. Maybe the alldirs mapall parameters are OS X special. I don't find them documented for unfsd.

 # VAGRANT-BEGIN: 501 0e101423-03fe-4b72-98ad-b0745111e9d8
 "/Users/ElmarHinz" 192.168.56.2 -alldirs -mapall=501:20
 "/Volumes/Work" 192.168.56.2 -alldirs -mapall=501:20
 # VAGRANT-END: 501 0e101423-03fe-4b72-98ad-b0745111e9d8

(I did remove those lines and recreated dinghy to check troubles are not caused by them.)

@elmar-hinz elmar-hinz changed the title Different users for home and mounts with VirtualBox Unaccessible file mounts with VirtualBox Apr 21, 2017
@codekitchen
Copy link
Owner

When I log in with dinghy ssh I find /Users/ElmarHinz mapped to root:root and those directories are mountable. /Volumes is mapped to the user 501:80 and is not mountable

Right now Dinghy only supports NFS mounting one directory at a time, if you use DINGHY_HOST_MOUNT_DIR to change the mount dir to /Volumes that means /Users/ElmarHinz will no longer be NFS shared. Am I understanding correctly that is what is going on?

Also I suspect a problem here:

eval $(dinghy env)
export DINGHY_HOST_MOUNT_DIR=/Volumes/
export DINGHY_GUEST_MOUNT_DIR=/Volumes/

It looks like you're exporting those env vars after dinghy is already running, which means they aren't taking effect. dinghy up needs to see those env vars.

@codekitchen
Copy link
Owner

Hi, I'm closing this due to inactivity, please re-open if you'd like to continue digging into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants