Docker container path permissions


Recommended Posts

For dockers, I've noticed that my docker folders (any container path folders within docker configuration) have permission set to 755 (nobody/users). I am primarily connecting to the shares via windows SMB, and cannot write to these docker folder paths. I have one configured user which I use to authenticate access to SMB shares. If I chmod 777 those folders, whenever the docker restarts, those docker folders and any contents go back to 755.

 

Is this the correct permission behavior of the dockers? This creates alot of inconvenience to get around this. I would like to be able to read/write to these docker folders through my windows client with ease. Instead I just make a script to chmod 777 those docker folders whenever the array starts. But that is not a robust solution.

 

I've encountered this with a transmission bt and ps3netserv dockers. I am trying to have the ps3 write to the share, but the file ends up blank due to the permission.

 

 

 

 

Link to comment

Docker containers may have their own unique permission requirements within their appdata folders.  This may or may not impact your ability to access the folders via SMB.  Changing permissions and/or ownership of the files/folders may (or may not) have negative consequences on the ability of the container to properly run.  YMMV

Link to comment

Unfortunately the two dockers I need external device access to have this issue, and they don't have configurable options for the folder permissions.

 

One is transmission+Openvpn. It does have the transmission option to set umask for the files. I set umask to 0, which allows the files to be 777. But the top lvl folder is still 755. And everytime the docker is started, it will change all the underlying files to 755...

 

 

Link to comment

So its a case by case situation for each docker application. I thought all my docker file paths were getting changed to 755 every time they start.

 

For the transmission docker if I turn off privileged, then it doesn't change all the folders and files back to 755 every time it starts. But without privileged, the webui and remote gui won't work. 

 

For the ps3 server docker, it doesn't change the permissions of the files when it starts. But the ps3 writing to the share folder creates data files with root/root and 1001 permissions. Doesn't seem to be any config settings for that application to make it spit out more friendly permission files. Also while that docker is running, Mover cannot move those files. 

 

Is there a simple way to run a script when a docker starts?

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.