I'm using Docker namespaces in an effort to allow files created within a volume to be arbitrarily read and written to by both the container user and the host user (please let me know if this is even a valid approach to what I'm trying to do!).

My host username is aryzing. So I'm running the docker deamon as

dockerd --userns-remap=aryzing

The volume maps my host's ~/workspace/app to the volume's /usr/src/app.

From the host system I have no issue modifying the files, but from within the container, I have access errors. Specifically, I'm running NPM's install command from within the container, npm install, and it's unable to install the packages due to a permissions error:

Error: EACCES: permission denied, access '/usr/src/app/node_modules'

As per this post I've also tried running the container with the --user flag, and ran into the same issue.

Any suggestions on how to achive the functionality I'm after?

1 Answer 1


I was tripping myself up: when I was trying the --user flag, I still had --userns-remap set. Running the daemon without --userns-remap did the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.