From e7a14049ff246363e4dc0cc9ec9f1cdc1490a169 Mon Sep 17 00:00:00 2001 From: Monnier Date: Thu, 23 Aug 2018 10:05:10 +0200 Subject: [PATCH] change owner and group of all files that are not associated to the correct group or user --- rootfs/usr/local/bin/run.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/rootfs/usr/local/bin/run.sh b/rootfs/usr/local/bin/run.sh index af35e10..1d526f3 100644 --- a/rootfs/usr/local/bin/run.sh +++ b/rootfs/usr/local/bin/run.sh @@ -33,10 +33,15 @@ sed -i "s//$OPCACHE_MEMORY_LIMIT/g" /etc/php7/conf.d/00_op # Set permissions # 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 -find /var/lib/nginx ! -user $UID -print0 +find /flarum ! -user $UID -print0 | xargs -0 -r chown $UID:$GID +find /services ! -user $UID -print0 | xargs -0 -r chown $UID:$GID +find /var/log ! -user $UID -print0 | xargs -0 -r chown $UID:$GID +find /var/lib/nginx ! -user $UID -print0 | xargs -0 -r chown $UID:$GID + +find /flarum ! -group $GID -print0 | xargs -0 -r chown $UID:$GID +find /services ! -group $GID -print0 | xargs -0 -r chown $UID:$GID +find /var/log ! -group $GID -print0 | xargs -0 -r chown $UID:$GID +find /var/lib/nginx ! -group $GID -print0 | xargs -0 -r chown $UID:$GID cd /flarum/app @@ -114,7 +119,8 @@ fi # Set permissions # chown -R $UID:$GID /flarum -find /flarum ! -user $UID -print0 +find /flarum ! -user $UID -print0 | xargs -0 -r chown $UID:$GID +find /flarum ! -group $GID -print0 | xargs -0 -r chown $UID:$GID