]> git.parisson.com Git - telemeta.git/commitdiff
Fix path exclusion for `find`
authorThomas Fillon <thomasfillon@users.noreply.github.com>
Tue, 20 Jun 2017 14:04:15 +0000 (16:04 +0200)
committerGitHub <noreply@github.com>
Tue, 20 Jun 2017 14:04:15 +0000 (16:04 +0200)
prune `${media}import=/srv/media§/import` path and only select directory for which user is not www-data

Fix #176

app/scripts/app.sh

index c8efb55c529ba08811120bdbe1ef49d19248d2a9..aa10fa66ef06c4b0217bced5c81ef366c6f351ef 100644 (file)
@@ -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