0

I have a docker-compose init script with this specific problematic line running at startup :

chown -R www-data:www-data /var/www/html/*

/var/www/html is mounted from a folder on the host machine.

When starting the container on macOs, the specified line modify the permissions only inside the docker, and not on the host side. When running on linux, the host mounted folder is affected by the permission change, meaning I no longer own this folder's content.

Is there anyway to circumvent that ? To have the same behaviour on Linux than on macOs ?

Tom
  • 1,357
  • 2
  • 13
  • 32
  • Here are some details on Docker difference between Mac and Linux if you are interested. Not sure if it helps - https://vessel.shippingdocker.com/docs/linux-permissions/ – naneri Mar 30 '19 at 14:35
  • Thank you, I'll go read that :) – Tom Apr 02 '19 at 10:49

0 Answers0