It is the first time to use mac, use docker to build a development environment, and when mounting settings are shared, they can be displayed normally. However, it is found that chmod cannot be used to change folder permissions in shared folders, which results in root being required to read and write. How to solve this problem?
Used docker in widnows before
Before, when using windows computers, docker was used to build the development environment. At that time, another phenomenon was that files under windows had 777 permissions after they were mounted on docker, so everything was normal. Not enough, this time it was only 755 on mac.
Try out the plan and derivative problems.
You can’t use umask set to 000
The folder cannot change permissions, but there is no problem with the file.
If you are using the Docker Toolbox, I suggest you download the new Docker for Mac.https://docs.docker.com/docker-for-mac/, which uses different mechanisms for file sharing (OSXfs), may solve your problem.