change owner and group of all files that are not associated to the correct group or user

pull/27/head
Monnier 2018-08-23 10:05:10 +02:00
parent f5c13d32cc
commit e7a14049ff
1 changed files with 11 additions and 5 deletions

View File

@ -33,10 +33,15 @@ sed -i "s/<OPCACHE_MEMORY_LIMIT>/$OPCACHE_MEMORY_LIMIT/g" /etc/php7/conf.d/00_op
# Set permissions # Set permissions
# chown -R $UID:$GID /flarum /services /var/log /var/lib/nginx # chown -R $UID:$GID /flarum /services /var/log /var/lib/nginx
find /flarum ! -user $UID -print0 find /flarum ! -user $UID -print0 | xargs -0 -r chown $UID:$GID
find /services ! -user $UID -print0 find /services ! -user $UID -print0 | xargs -0 -r chown $UID:$GID
find /var/log ! -user $UID -print0 find /var/log ! -user $UID -print0 | xargs -0 -r chown $UID:$GID
find /var/lib/nginx ! -user $UID -print0 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 cd /flarum/app
@ -114,7 +119,8 @@ fi
# Set permissions # Set permissions
# chown -R $UID:$GID /flarum # 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