-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing ENV for PUID, PGID and UMASK #3
Comments
It would seem that PUID and PGID can be set. (My bad, didn't actually try to add the env-vars because they weren't listed in the documentation of this docker) However, I cannot get the UMASK working, which is important to define what permissions the files created by the docker should have i.e. UMASK of 000 results in files with 666 whereas 022 results in files with 644 which interferes with the permission system of my host OS (Unraid). |
So UMASK cannot be set by default in the images I am using. Updated the docs with PUID and PGID. For masking I usually set the bit in the host file system as I have never had a great time with containers doing the right thing. So I set 2766 on the root folders on the host for the mapped volume and that ensure the permissions are replicated correctly. |
Sorry to be a bother, but can you elaborate on this? What commands would I have to use to do this? I have a similar issue with the Nextcloud docker image.... I would have to be able to force the container to write files with 666 and folders with 777. Right now I'm running a cron-job periodically to adjust the permissions but that obviously isn't a great solution. Any links/insights would be highly appreciated! |
The joys of the Linux file system. I would like to introduce you to the SUID, GUID and Sticky Bit. Yes, that was my thought as well... I set the GUID on directories so any files created in the directory will have their group ownership set to that of the directory owner. You can also run Read through these for background: |
Describe the bug
No option to change PUID, GUID and UMASK. This makes it hard to have it work nicely with the rest of the system. Other than that It seems to work really well, great job on the container!
To Reproduce
Steps to reproduce the behaviour:
ls -la
Expected behavior
Most bigger docker images offer you the option to set the PUID, GUID and UMASK with environment variables, which gives you the information needed inside of the image.
Screenshots
![image](https://user-images.githubusercontent.com/45201085/158433085-28a52289-f845-4802-8bea-4507aad40691.png)
![image](https://user-images.githubusercontent.com/45201085/158433621-3dabff91-86e4-478b-8a90-e5b853dd6b4b.png)
What the permissions look like by default
What I need it to be for it to work nicely with Unraid (PID=99, GIP=100, UMASK=000)
Server:
Additional context
I'm running Unraid on my server. Unraid uses the user "nobody" and the group "users" for all files with a UMASK of 000. This works with multiple users because the group and everyone have rw-access. The user can be different depending on which user wrote files to the share but the group is always the same, thus ensuring easy access to files without having to mess with the shell every time.
The text was updated successfully, but these errors were encountered: