diff --git a/nextcloud/Dockerfile.12.0 b/nextcloud/Dockerfile.12.0 index 11a9f11..bd3c6d4 100644 --- a/nextcloud/Dockerfile.12.0 +++ b/nextcloud/Dockerfile.12.0 @@ -16,7 +16,8 @@ ENV UID=991 GID=991 \ CRON_MEMORY_LIMIT=1g \ TZ=Etc/UTC \ DB_TYPE=sqlite3 \ - DOMAIN=localhost + DOMAIN=localhost \ + CHECK_PERMISSIONS=1 RUN apk -U upgrade \ && apk add -t build-dependencies \ diff --git a/nextcloud/Dockerfile.13.0 b/nextcloud/Dockerfile.13.0 index 122ba3a..1db4479 100644 --- a/nextcloud/Dockerfile.13.0 +++ b/nextcloud/Dockerfile.13.0 @@ -16,7 +16,8 @@ ENV UID=991 GID=991 \ CRON_MEMORY_LIMIT=1g \ TZ=Etc/UTC \ DB_TYPE=sqlite3 \ - DOMAIN=localhost + DOMAIN=localhost \ + ChECK_PERMISSIONS=1 RUN apk -U upgrade \ && apk add -t build-dependencies \ diff --git a/nextcloud/README.md b/nextcloud/README.md index 98692ed..0933acc 100644 --- a/nextcloud/README.md +++ b/nextcloud/README.md @@ -56,6 +56,7 @@ Other tags than `daily` are built weekly. For security reasons, you should occas - **DB_USER** : username for database *(default : none)* - **DB_PASSWORD** : password for database user *(default : none)* - **DB_HOST** : database host *(default : none)* +- **CHECK_PERMISSIONS** : disable permission check *(default: 1)* Don't forget to use a **strong password** for the admin account! diff --git a/nextcloud/rootfs/usr/local/bin/run.sh b/nextcloud/rootfs/usr/local/bin/run.sh index 6accca2..65c068d 100644 --- a/nextcloud/rootfs/usr/local/bin/run.sh +++ b/nextcloud/rootfs/usr/local/bin/run.sh @@ -22,16 +22,20 @@ if [ ! -d /data/session ]; then mkdir -p /data/session; fi -echo "Updating permissions..." -for dir in /nextcloud /data /config /apps2 /var/log /php /nginx /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 [ "$CHECK_PERMISSIONS" = "1" ]; then + echo "Updating permissions..." + for dir in /nextcloud /data /config /apps2 /var/log /php /nginx /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." +else + echo "Skip checking permissions" +fi if [ ! -f /config/config.php ]; then # New installation, run the setup