Docker Containers won't fully set up new Folders Files on new containers - Docker SMB FSTAB share for config and Data reddit / selfhosted ---------------------------------------------------------------------- oddie121 · 2023-11-27 16:23 I'm moving my docker containers that contain volumes / configs / data storage to a SMB Share I have on a TrueNAS server. Share setup - Was a pre-existing pool. New Dataset. Previous SMB shares to other data sets that are working. Set Share ACL to everyone. File System ACL set to a created user account group and domain group (for current testing purposes) with Full Control. Defaults of owner@ Full control and group@ modify were left as is. Simply added the user (Created in TrueNAS) and AD group above to the default permissions. Ubuntu side - FSTab [`//192.x.x.x/Docker`](//192.168.20.17/DockerSH) `/Docker/Docker cifs uid=1000,gid=1000,credentials=////.smb,iocharset=utf8,vers=3.0,noperm 0 0` Note: I have other shares in FSTAB that seem to work as designed for apps within the containers. They're NOT explicitly for the container storage. Share mounts fine, can create / read / execute test .txts or folders fine with user account, can do the same with sudo in front of commands. When creating a container (using portainer if that makes a difference) i'm simply doing under the services - `volumes:` `- /Docker/Docker/Data//mysql:/var/lib/mysql` When the container initializes i can see it creating some, not all, base files. If i keep the container up, modified dates on some of those files will continually update. In this case with SQL it won't create the service folders and initialize the database. Thus it fails the startup / initialization of the app / stack. In other apps, it fails to write the full base folder structure. Which then fails the startup of the app. If i change the above to the local storage of the ubuntu server something like - `volumes:` `- /portainer/Files/AppData/Data//mysql:/var/lib/mysql` It'll create 100% and startup. If I then take those files (the whole /mysql folder and do - `sudo cp -rv ./ /Docker/Docker/Data//mysql/` Note: if i don't do sudo, I get access denied After doing the above copy (or move but playing it safe for some) I change the volume back to the above Docker path, everything starts, works and continues to write properly. I double checked Filesystem ACLs in windows, noticed there was a truenas\\useraccount permission that didn't have full permissions but the unix group\\useraccount did. I tried to give the truenas\\useraccount full permissions and didn't change anything. If i look at the permissions in windows after the sudo copy, they don't look any different than before. Wish i could compare them to original creation but that's the whole point of this post. In the above when simply not pre creating and moving, I logged into the container and nativated to /var/lib/mysql and created a file, wrote to the file and could view the file through windows, the container and the ubuntu host. As you can see from the above, i matched the UID and GID to be that of docker, from what I could verify, in FSTAB. In portainer, I tried to pre-create the volume without success What am I missing to check or setup to allow docker to simply create it on its own fully? ​ ---------------------------------------------------------------------- notdoreen · 2023-11-27 17:07 !remind me 2 hours ---------------------------------------------------------------------- RemindMeBot · 2023-11-27 17:08 I will be messaging you in 2 hours on [**2023-11-27 19:07:18 UTC**](ht tp://www.wolframalpha.com/input/?i=2023-11- 27%2019:07:18%20UTC%20To%20Local%20Time) to remind you of [**this link **](https://www.reddit.com/r/selfhosted/comments/1856t39/docker_contai ners_wont_fully_set_up_new_folders/kazubg0/?context=3) [**CLICK THIS LINK**](https://www.reddit.com/message/compose/?to=Remin dMeBot&subject=Reminder&message=%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2F selfhosted%2Fcomments%2F1856t39%2Fdocker_containers_wont_fully_set_up_ new_folders%2Fkazubg0%2F%5D%0A%0ARemindMe%21%202023-11- 27%2019%3A07%3A18%20UTC) to send a PM to also be reminded and to reduce spam. ^(Parent commenter can ) [^(delete this message to hide from others.)] (https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Delete %20Comment&message=Delete%21%201856t39) ***** |[^(Info)](https://www.reddit.com/r/RemindMeBot/comments/e1bko7/remind mebot_info_v21/)|[^(Custom)](https://www.reddit.com/message/compose/?t o=RemindMeBot&subject=Reminder&message=%5BLink%20or%20message%20inside %20square%20brackets%5D%0A%0ARemindMe%21%20Time%20period%20here)|[^(Yo ur Reminders)](https://www.reddit.com/message/compose/?to=RemindMeBot& subject=List%20Of%20Reminders&message=MyReminders%21)|[^(Feedback)](ht tps://www.reddit.com/message/compose/?to=Watchful1&subject=RemindMeBot %20Feedback)| |-|-|-|-| ---------------------------------------------------------------------- hdddanbrown · 2023-11-28 02:23 why not ask /r/docker for docker support ---------------------------------------------------------------------- herbedj · 2023-11-28 12:50 I sense you may be a little grumpy.