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.7.0~2^2~21^2^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=9a995df6154e40e432294cb58ed5763d6bbcdb73;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) Conflicts: app/scripts/app.sh --- diff --git a/app/scripts/app.sh b/app/scripts/app.sh index cad8c42b..0d5bfeb4 100644 --- a/app/scripts/app.sh +++ b/app/scripts/app.sh @@ -43,9 +43,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 @@ -55,6 +52,9 @@ else # --command='python '$manage' collectstatic --noinput' $src & 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 \