From 33a9a79065261895ab00f7e7e6b9a8c620c1ad10 Mon Sep 17 00:00:00 2001 From: Wonderfall Date: Tue, 17 Jan 2017 19:22:57 +0100 Subject: [PATCH] nextcloud: fix chown (closes #89) --- nextcloud/11.0-armhf/Dockerfile | 14 +++++++------- nextcloud/11.0-armhf/run.sh | 7 ++++++- nextcloud/11.0/run.sh | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/nextcloud/11.0-armhf/Dockerfile b/nextcloud/11.0-armhf/Dockerfile index 625a5ed..812fa46 100644 --- a/nextcloud/11.0-armhf/Dockerfile +++ b/nextcloud/11.0-armhf/Dockerfile @@ -1,15 +1,15 @@ FROM orax/alpine-armhf:edge MAINTAINER Wonderfall -ARG NEXTCLOUD_VERSION=11.0.0RC2 +ARG NEXTCLOUD_VERSION=11.0.1 ARG GNU_LIBICONV_VERSION=1.14 ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A" ENV UID=991 GID=991 \ UPLOAD_MAX_SIZE=10G \ - APC_SHM_SIZE=128M \ - OPCACHE_MEM_SIZE=128 \ - REDIS_MAX_MEMORY=64mb \ + APC_SHM_SIZE=64M \ + OPCACHE_MEM_SIZE=64 \ + REDIS_MAX_MEMORY=32mb \ CRON_PERIOD=15m \ TZ=Etc/UTC \ DB_TYPE=sqlite3 \ @@ -83,9 +83,9 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a && echo "extension=smbclient.so" > /etc/php7/conf.d/00_smbclient.ini \ && mkdir /nextcloud \ && NEXTCLOUD_TARBALL="nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \ - && wget -q https://download.nextcloud.com/server/prereleases/${NEXTCLOUD_TARBALL} \ - && wget -q https://download.nextcloud.com/server/prereleases/${NEXTCLOUD_TARBALL}.sha256 \ - && wget -q https://download.nextcloud.com/server/prereleases/${NEXTCLOUD_TARBALL}.asc \ + && wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL} \ + && wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.sha256 \ + && wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.asc \ && wget -q https://nextcloud.com/nextcloud.asc \ && echo "Verifying both integrity and authenticity of ${NEXTCLOUD_TARBALL}..." \ && CHECKSUM_STATE=$(echo -n $(sha256sum -c ${NEXTCLOUD_TARBALL}.sha256) | tail -c 2) \ diff --git a/nextcloud/11.0-armhf/run.sh b/nextcloud/11.0-armhf/run.sh index 48aa6da..975a6ff 100644 --- a/nextcloud/11.0-armhf/run.sh +++ b/nextcloud/11.0-armhf/run.sh @@ -10,11 +10,16 @@ sed -i -e "s//$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/ph ln -sf /config/config.php /nextcloud/config/config.php &>/dev/null ln -sf /apps2 /nextcloud &>/dev/null -for dir in /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /var/lib/redis /tmp /etc/s6.d; do +echo "Updating permissions..." +for dir in /nextcloud/config /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /var/lib/redis /tmp /etc/s6.d; do if $(find $dir ! -user $UID -o ! -group $GID|egrep '.' -q); then + echo "Updating permissions in $dir..." chown -R $UID:$GID $dir + else + echo "Permissions in $dir are correct." fi done +echo "Done updating permissions." if [ ! -f /config/config.php ]; then # New installation, run the setup diff --git a/nextcloud/11.0/run.sh b/nextcloud/11.0/run.sh index 7023ff7..975a6ff 100644 --- a/nextcloud/11.0/run.sh +++ b/nextcloud/11.0/run.sh @@ -11,7 +11,7 @@ ln -sf /config/config.php /nextcloud/config/config.php &>/dev/null ln -sf /apps2 /nextcloud &>/dev/null echo "Updating permissions..." -for dir in /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /var/lib/redis /tmp /etc/s6.d; do +for dir in /nextcloud/config /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /var/lib/redis /tmp /etc/s6.d; do if $(find $dir ! -user $UID -o ! -group $GID|egrep '.' -q); then echo "Updating permissions in $dir..." chown -R $UID:$GID $dir