From 040e839e8958be327fdcde6ee1fda9a40b944429 Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Tue, 20 Jun 2017 16:04:15 +0200 Subject: [PATCH] Fix path exclusion for `find` MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit prune `${media}import=/srv/media§/import` path and only select directory for which user is not www-data Fix #176 --- app/scripts/app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5