realies / soulseek-docker

🐳 Soulseek Docker Container
https://hub.docker.com/r/realies/soulseek/
MIT License
210 stars 35 forks source link

Option to set UMASK variable #37

Closed tylernguyen closed 2 years ago

tylernguyen commented 2 years ago

Hi,

Currently the container write files with -rw-r--r-- permissions.

I would prefer to be able to set unask so that the container writes with -rw-rw-rw- permissions instead. This would allow for moving/changing files via SMB (since the data is stored on a connected Unraid server). Whereas right now I have to chmod the particular files each time I want to do an operation via SMB.

KuroSetsuna29 commented 2 years ago

Note to @realies, this can be done by adding umask 0000 to the init.sh entrypoint script.

For those that want to workaround that, what I have done is:

  1. create entrypoint.sh in my "persistent" appdata folder, with following:
    
    #!/bin/bash
    umask 0000

/bin/sh /init.sh


2. Ensure the script is executable `chmod a+x entrypoint.sh`
3. Then specify `--entrypoint /data/.SoulseekQt/entrypoint.sh` in your docker run command
realies commented 2 years ago

@KuroSetsuna29, thanks, I think it will be nice for this to be the default. I've added it to https://github.com/realies/soulseek-docker/commit/446de249879f3af4fe31a5772119558f70c95f2f

Unfortunately, the build process is currently broken, will let you know when the new image is up.

KuroSetsuna29 commented 2 years ago

Hi @realies, thanks! I would also recommend allowing to overwrite the umask by setting an umask environment variable. Similar to how you can set pgid and puid.