Run your application at full speed while syncing your code for development, finally empowering you to utilize docker for development under OSX/Windows/*Linux
GNU General Public License v3.0
3.54k
stars
290
forks
source link
Files in app container owned by unexpected user (ID 33) #797
As title says. I have a Docker Compose setup that runs the app as root (ID 0). When I use Docker Sync, it starts writing to its app_sync directory as xfs with ID 33. This makes the file on my app container owned by www-data because it has user ID 33, making my app break due to write permission issues. Strange enough, files in host_sync are owned by root.
I've tried configuring sync_userid: 0 because both my app container and Docker Sync root have ID 0. However, this doesn't change anything. Files are still writing as xfs in app_sync and as root in host_sync. I've tried restarting, syncing, and cleaning.
I thought my app container should get ownership of host_sync's permission, but it appears to get app_sync's directly for some reason. Any idea what I'm configuring wrong?
To sum it up, file ownership are like this:
Inside Docker Sync's app_sync directory, files are written with xfs (ID 33).
Inside Docker Sync's host_sync directory, files are written with root (ID 0).
Inside app container, web user is www-data (33), and it writes with that ownership.
As title says. I have a Docker Compose setup that runs the app as
root
(ID 0). When I use Docker Sync, it starts writing to itsapp_sync
directory asxfs
with ID33
. This makes the file on my app container owned bywww-data
because it has user ID33
, making my app break due to write permission issues. Strange enough, files inhost_sync
are owned byroot
.I've tried configuring
sync_userid: 0
because both my app container and Docker Syncroot
have ID0
. However, this doesn't change anything. Files are still writing asxfs
inapp_sync
and asroot
inhost_sync
. I've triedrestart
ing,sync
ing, andclean
ing.I thought my app container should get ownership of
host_sync
's permission, but it appears to getapp_sync
's directly for some reason. Any idea what I'm configuring wrong?To sum it up, file ownership are like this:
app_sync
directory, files are written withxfs
(ID 33).host_sync
directory, files are written withroot
(ID 0).www-data
(33), and it writes with that ownership.