From: Thomas Fillon Date: Wed, 20 Sep 2017 10:23:30 +0000 (+0200) Subject: Restrict chown fix to depth level 1 X-Git-Tag: 1.6.4c~8 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=02be69b676456d4e142b52589afd150c6f16c4f5;p=telemeta.git Restrict chown fix to depth level 1 This should prevent very long recursive checking in production. Move the code in order to execute that line only for production (and not runserver) --- diff --git a/app/scripts/app.sh b/app/scripts/app.sh index c293c44c..ab2aba0e 100644 --- a/app/scripts/app.sh +++ b/app/scripts/app.sh @@ -41,9 +41,6 @@ if [ $REINDEX = "True" ]; then python $manage rebuild_index --noinput fi -# fix media access rights -find $media -path ${media}import -prune -o -type d -not -user www-data -exec chown www-data:www-data {} \; - # choose dev or prod mode if [ "$1" = "--runserver" ]; then python $manage runserver 0.0.0.0:8000 @@ -54,6 +51,9 @@ else python $manage collectstatic --noinput + # fix media access rights + find $media -maxdepth 1 -path ${media}import -prune -o -type d -not -user www-data -exec chown www-data:www-data {} \; + # app start uwsgi --socket :$port --wsgi-file $wsgi --chdir $app --master \ --processes $processes --threads $threads \