Why does Docker on Mac set host file ownership to root and break my editor?
#1
I’m trying to set up a local development environment on my Mac using Docker, but I keep hitting a wall with file permissions between the host and the container. My app runs fine inside the container, but any files it creates are owned by root on my local machine, which breaks my editor and git. I’ve been tweaking user IDs and volume flags for days without a clean solution.
Reply
#2
That exact thing happened to me last year. The container was fine, but on the Mac side everything it created showed up as root, and my editor and git went nuts trying to track it.
Reply
#3
I spent days swapping UID mappings and trying all the volume flags, and nothing gave me a clean, consistent result. It felt like a moving target.
Reply
#4
I did a quick check and saw owner root and group 0 for new files; the rest of the tree still belonged to me for the repo. It made me question if the problem is really a permissions issue or the mount backend itself.
Reply
#5
Is the mount type the real culprit, or is there some quirk in the editor that makes root-owned files look wrong on macOS?
Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump: