From: Thomas Fillon Date: Tue, 20 Jun 2017 14:04:15 +0000 (+0200) Subject: Fix path exclusion for `find` X-Git-Tag: search~2^2~2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=040e839e8958be327fdcde6ee1fda9a40b944429;p=telemeta.git Fix path exclusion for `find` prune `${media}import=/srv/media§/import` path and only select directory for which user is not www-data Fix #176 --- diff --git a/app/scripts/app.sh b/app/scripts/app.sh index c8efb55c..aa10fa66 100644 --- a/app/scripts/app.sh +++ b/app/scripts/app.sh @@ -39,7 +39,7 @@ if [ $REINDEX = "True" ]; then fi # fix media access rights -find $media -type d -not -path $media/import -exec chown www-data:www-data {} \; +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