feat: Add disabling of ownership change

This commit is contained in:
Bocki 2022-07-04 09:03:55 +02:00
parent 72471b34ed
commit 8f0b9af270
2 changed files with 9 additions and 2 deletions

View File

@ -55,6 +55,7 @@ Pull the latest container for the latest Deemix version
| `-e DEEMIX_SINGLE_USER=true` | OPTIONAL: Similar to the ARL functionality in previous iterations. See below for details |
| `-p 6595:6595` | Port opened for the web interface |
| `-e INTPORT=3333` | EXTRA OPTIONAL: This changes the internal port of deemix. DON'T CHANGE THIS IF YOU DONT KNOW WHY YOU WOULD DO IT |
| `-e DISABLE_OWNERSHIP_CHECK=true` | EXTRA OPTIONAL: This disables the ownership check on the downloads folder. Can lead to download issues if the folder is not owned by the correct user. DON'T USE THIS IF YOU DONT KNOW WHY YOU WOULD NEED IT |
| `registry.gitlab.com/bockiii/deemix-docker` | This container |
To access the web interface, go to http://YOURSERVERIP:6595

View File

@ -1,12 +1,18 @@
#!/usr/bin/with-contenv bash
# test write access to download and config folder and test internet connectivity
printf '[cont-init.d] Fixing Folder Permissions\n'
printf '[cont-init.d] Fixing Folder Permissions - Config Folder\n'
chown -R abc:abc /config
# find all folders in the download folder and own them to the container user. This will not change files but should run quicker on big collections.
find /downloads -type d -exec chown abc:abc {} +
if [ ! -z ${DISABLE_OWNERSHIP_CHECK} ]; then
printf '[cont-init.d] Download Folder Ownership Check disabled by Environment Variable\n'
else
printf '[cont-init.d] Fixing Folder Permissions - Downloads Folder\n'
find /downloads -type d -exec chown abc:abc {} +
fi
# add executability to server
chmod +x /deemix-server