Commit f96633bd authored by Mikaël Salson's avatar Mikaël Salson

docker/vidjil-server/scripts/uwsgi-entrypoint.sh: Don't chown result/ and upload/

Those directories may contain sensitive data and may have a huge number of files.
More generally we don't want to modify the external directories

Fixes #3638
parent 6137386b
Pipeline #52576 passed with stages
in 6 minutes and 56 seconds
#!/bin/bash
touch /var/vidjil/vidjil.log
touch /var/vidjil/vidjil-debug.log
chown -R www-data:www-data /var/vidjil/vidjil*
chown -R www-data:www-data /mnt/result
chown -R www-data:www-data /mnt/upload
chown -R www-data:www-data /usr/share/vidjil/server/web2py/applications/vidjil/databases
/usr/local/bin/gosu www-data /usr/bin/uwsgi --ini /etc/uwsgi/apps-enabled/web2py.ini
if [ -d /mnt/result/results ]; then
user=$(stat -c '%u' /mnt/result/results)
else
user=www-data
fi
chown -R $user /var/vidjil/vidjil*
chown -R $user /usr/share/vidjil/server/web2py/applications/vidjil/databases
/usr/local/bin/gosu $user /usr/bin/uwsgi --ini /etc/uwsgi/apps-enabled/web2py.ini
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment