0

I am using Docker-machine on Mac for a PHP application. My code is shored in mac, and shared to docker-machine as volume.

This is my docker-compose.yml

app: build: . volumes: - .:/var/www/html

My PHP application will create a folder in the shared volume and write some files in it. The shared volume is set to permission 777 on mac (which I know I shouldn't do it, but I cannot solve the problem even with this) After running the application, I got mkdir(): Permission denied. The newly created folder is in permission drwxr-xr-x, so my application cannot write any file in it.

Is there anyway to set the new folders to inherit folder permission from its parent?

Anthony Tsang
  • 345
  • 1
  • 4
  • 13

1 Answers1

0

You might want to look at http://docker-sync.io - using unison as strategoy, you can actually properly map the uid on the user in the container, removing any issues with permissions.

Eugen Mayer
  • 8,942
  • 4
  • 33
  • 57
  • I am using docker-sync with WSL and the performance has been great. However I have dynamically created bash scripts that are temporarily put on my shared volume but the permissions don't stick so they fail to execute when the time arrives. – raupie Dec 02 '17 at 00:06