Closed leolandotan closed 7 years ago
I am assuming the existing modules were part of the codebase and installed without going through docker.
This is not really a d4m-nfs but rather a standard docker methodology to understand. The docker engine (mac in this case) and the docker container (php) have different user IDs (UIDs) for the users between the 2 systems. Sometimes you may even see in the engine or the container, a file/directory that has no named owner/group, but rather just an integer. This means that on the opposite side, that no UID matched a user. /etc/group will show what the engine or container believes a UID to map to a user.
In the php container, check to see what the ownership looks like. Something like "docker exec -it php /bin/sh" and then navigate to that directory and see how it looks from "inside", as this is where the permission really matters for php to properly run and read the file.
This is not really an issue as long as you can edit the file on the mac, and php can properly interact with the file in the container. If either side cannot, an option is to add a user to the container that matches the engine user. As an example, we add a php user, 1970 to the php engine, and a 1970 user to nginx container, and then on the host linux system we add a 1970 user called fulcrum (our product name) so we have a "proper" display name across all the systems that has correct permissions on the directories and files.
Check out this link for some more info: https://stackoverflow.com/questions/23544282/what-is-the-best-way-to-manage-permissions-for-docker-shared-volumes
Hi @if-kyle ,
Thank you very much for your detailed explanation and patience for doing so. :) I was asking this because my colleague only had the vanilla Docker installation and when he used my Docker Compose setup, his dockermysql
folder user was the same as the host user. So I think this an NFS and the default docker file sharing method(osfx or something) right?
Yes, that does sound correct.
Hi guys!
Issue
I'm not sure if this is weird but I have my web/php service with Drush installed using:
When I run
docker exec -i myproject_web_1 drush dl flag
the owner is not set to me but to the root user unlike the other existing modules like so:Is this normal?
Configuration details
Docker for Mac's Preferences -> File Sharing
d4m-nfs/etc/d4m-nfs-mounts.txt
/tmp/d4m-mount-nfs.sh
/tmp/d4m-nfs-mounts.txt
/etc/exports