From f5c13d32cc23e03c73ff45b214da256cf973238d Mon Sep 17 00:00:00 2001 From: Monnier Date: Thu, 23 Aug 2018 09:49:50 +0200 Subject: [PATCH] remove do chmod flag and test to use find only --- README.md | 1 - rootfs/usr/local/bin/run.sh | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2b4d6ab..3742820 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,6 @@ Flarum is the next-generation forum software that makes online discussion fun. I | **PHP_MEMORY_LIMIT** | PHP memory limit | *optional* | 128M | | **OPCACHE_MEMORY_LIMIT** | OPcache memory size in megabytes | *optional* | 128 | **LOG_TO_STDOUT** | Enable nginx and php error logs to stdout | *optional* | false -| **DO_CHMOD** | Enable or Disable chmod of files to $UID:$GUID | *optional* | true ## Installation diff --git a/rootfs/usr/local/bin/run.sh b/rootfs/usr/local/bin/run.sh index 507bab6..af35e10 100644 --- a/rootfs/usr/local/bin/run.sh +++ b/rootfs/usr/local/bin/run.sh @@ -31,9 +31,8 @@ sed -i "s//$PHP_MEMORY_LIMIT/g" /etc/php7/php-fpm.conf sed -i "s//$OPCACHE_MEMORY_LIMIT/g" /etc/php7/conf.d/00_opcache.ini # Set permissions -if [ "$DO_CHMOD" = true ]; then - # chown -R $UID:$GID /flarum /services /var/log /var/lib/nginx -fi +# chown -R $UID:$GID /flarum /services /var/log /var/lib/nginx + find /flarum ! -user $UID -print0 find /services ! -user $UID -print0 find /var/log ! -user $UID -print0 @@ -113,9 +112,8 @@ else fi # Set permissions -if [ "$DO_CHMOD" = true ]; then - # chown -R $UID:$GID /flarum -fi +# chown -R $UID:$GID /flarum + find /flarum ! -user $UID -print0