Clarify Permissions for Custom Volumes on TrueNAS SCALE #4520
Replies: 2 comments
-
|
For the docker-mailserver/target/scripts/startup/setup.d/mail_state.sh Lines 93 to 138 in 2079841 There's various other changes throughout where you'll probably have to search the project source for docker-mailserver/target/scripts/startup/setup-stack.sh Lines 85 to 114 in 2079841 One of the function calls there is for docker-mailserver/target/scripts/helpers/utils.sh Lines 69 to 81 in 2079841 Similar for docker-mailserver/target/scripts/startup/setup-stack.sh Lines 127 to 154 in 2079841 It's not quite the straight-forward answer you'd like, but I don't have a convenient answer to offer beyond the above references 😓 We have had a variety of issues / discussions opened where there have been problems that are difficult for us to reproduce and turned out to be due to remote storage use or NAS users (especially those with outdated or heavily patched kernels). Generally the container operates as the Beyond this information not much is documented as our affected users tend to take whatever solutions work at the time and not contribute back for other users in the same boat 😅 |
Beta Was this translation helpful? Give feedback.
-
|
Thanks a lot for your detailed reply and for taking the time! I spent weeks of my free time roleplaying as sysadmin@home, messing around with this stuff, and honestly, I just couldn’t get it to work right. I took all the info you shared and what I found online(which helped me learn a ton), but every time it seemed to work, random permission issues would pop up and I’d have to start over. So in the end, I made an Ubuntu LXC inside TrueNAS, mounted my appdata dataset as shared storage, stripped off all the ACLs, and set it back to basic Linux (POSIX) permissions. Then I moved my whole Docker stack over to the LXC—and now it finally works. What a ride, haha. It’s a bit of a compromise for now. I gave up on the “perfect” setup and just wanted something stable that I can rely on day-to-day. The cool thing is, I can still do snapshot backups in TrueNAS, and power/resource usage is still super efficient with good performance—honestly, little to no difference. Not perfect, but it works! Still need to do some fine-tuning (filters and all that), but for now I’m honestly really happy. And I’m definitely gonna keep experimenting in the future. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, thanks for the great work on docker-mailserver!
I'm running
docker-mailserveras a custom app on TrueNAS SCALE, using two separate ZFS datasets, permissions managed by ACL:/mnt/Wonderpool/mail→ mounted as/var/mail/mnt/Wonderpool/appData/docker-mailserver→ mounted as/tmp/docker-mailserver(for config, logs, mail-state)During setup, I didn't pay attention to permissions and gave broad access to all users and just ran with it. Afterward I wanted to clean up and set the Owner and Group to
vmail(UID 5000) for both mounts and only gave my TrueNAS admin user (not root) access via ACL aswell. This was based on the assumption that:vmailafter being processed.vmailas the user running most services in the container.For other Containers this strategy worked for me. When I usually struggle with permission problems the container wont even execute properly and throw alot of errors. Here everything seems fine, and the docker mailserver starts without error, The logs show it’s reading my config properly and processing mail normally, but no mail ends up in
/var/mailunless I alloweveryonewrite access. It took me quite a while to find these errors in my log, so I assume they are related to Postfix wheneveryoneis not allowed write access. Once I alloweveryonewrite access, the errors disappear, and I find new mail in/var/mail.The error I’m seeing in the logs is:
Questions:
vmail, and what permissions do I need to set for/var/mail,/tmp/docker-mailserver,/var/log/mail, and/var/mail-state? It seems to break when I only givevmail(5000) these permissions.I'm still learning and might be overlooking something obvious, but I'm really enjoying experimenting with my Homelab and learning from it.
Thanks!
shaddowlink
Beta Was this translation helpful? Give feedback.
All reactions