Closed LennardWesterveld closed 7 years ago
@LennardWesterveld did you remove /Users from the Docker for Mac preferences? From the Readme:
You can now specify what mounts you want in the d4m-nfs-mounts.txt file. Note that if you do this, you need to make sure that it does not conflict with D4M settings, in other words if you want to have /Users be served by NFS instead of osxfs you will need to remove it from the D4M Preferences -> File Sharing. The /tmp share must stay since that is how d4m-nfs exchanges information with the D4M Moby VM.
@LennardWesterveld one other thing that I thought of is that you are trying to export the mounts with UID 1000 and GID 1000 that probably don't exist, unless you created a user and group on your Mac with these IDs.
The idea behind UID/GID mapping is that the NFS host export maps permissions the to corresponding UID/GID on the system, not change the owner on the client.
As a sanity check to see if things work, change:
/Volumes:/Volumes:1000:1000 /private:/private:1000:1000 /Users:/Users:1000:1000
to:
/Volumes:/Volumes:0:0 /private:/private:0:0 /Users:/Users:0:0
For better explanation see:
Hi @if-kenn, Alright i understand, so thats why the owner ship doen't change in the docker container. So when i change it to 0:0 the mount permissions will be root so there will be no issue when writing?
Anyway i will try it today if that works, probably thats solves my issue.
So to accomplish what you are wanting, you would use the 0:0 ids and on your Mac change desired ownership of files to 1000:1000, e.g:
sudo chmod 1000:1000 /Users/lennard/foobar
Even though the user and group does not exist most Unix systems still allow you to assign a numeric ID instead of a name. Note that you might have to add you user to the 1000 group or some such thing. Every circumstance requires a different tactic, even when not using NFS.
Good luck!
@LennardWesterveld I am going to consider this closed, please reopen or make a new issue if you need to.
Hi there,
I have some issues with the ownership mapping. What i want to accomplish is that mounted /Users/ volume will have UID:1000 and GUID:1000. So what i did is in etc/d4m-nfs-mounts.txt added:
osx $ cat /etc/exports
Everything is looking fine so far (also tried to remove localhost) but when i go into the d4m screen (screen -r d4m) the ownership is not 1000 but still the osx user id.
OSX version: MacOS siera 10.12.2 bèta (16C48b) Docker version: 10.12.2 bèta (16C48b)