diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index b552dcf3..796f3cd0 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -216,6 +216,12 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then fi # We do our own permission check so the permission check is not needed + cat << DATADIR_PERMISSION_CONF > /var/www/html/config/datadir.permission.config.php + false +); +DATADIR_PERMISSION_CONF php /var/www/html/occ config:system:set check_data_directory_permissions --value=false --type=bool # Try to force generation of appdata dir: @@ -238,6 +244,9 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then fi fi + # This autoconfig is not needed anymore and should be able to be overwritten by the user + rm /var/www/html/config/datadir.permission.config.php + # unset admin password unset ADMIN_PASSWORD @@ -299,11 +308,6 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then done fi - # Set the permission check to its default value again if not set - if [ "$SKIP_DATA_DIRECTORY_PERMISSION_CHECK" != yes ]; then - php /var/www/html/occ config:system:set check_data_directory_permissions --value=true --type=bool - fi - #upgrade else touch "$NEXTCLOUD_DATA_DIR/update.failed" diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 82206a2e..7d2446a1 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -71,7 +71,6 @@ sed -i 's|APACHE_MAX_SIZE=|APACHE_MAX_SIZE=10737418240 # This needs to sed -i 's|NEXTCLOUD_MAX_TIME=|NEXTCLOUD_MAX_TIME=3600 # This allows to change the upload time limit of the Nextcloud container|' sample.conf sed -i 's|NEXTCLOUD_TRUSTED_CACERTS_DIR=|NEXTCLOUD_TRUSTED_CACERTS_DIR=/usr/local/share/ca-certificates/my-custom-ca # Nextcloud container will trust all the Certification Authorities, whose certificates are included in the given directory.|' sample.conf sed -i 's|UPDATE_NEXTCLOUD_APPS=|UPDATE_NEXTCLOUD_APPS="no" # When setting to "yes" (with quotes), it will automatically update all installed Nextcloud apps upon container startup on saturdays.|' sample.conf -sed -i 's|SKIP_DATA_DIRECTORY_PERMISSION_CHECK=|SKIP_DATA_DIRECTORY_PERMISSION_CHECK="no" # When setting to "yes" (with quotes), it will skip the datadir permission check upon the initial Nextcloud installation.|' sample.conf sed -i 's|APACHE_PORT=|APACHE_PORT=443 # Changing this to a different value than 443 will allow you to run it behind a web server or reverse proxy (like Apache, Nginx and else).|' sample.conf sed -i 's|APACHE_IP_BINDING=|APACHE_IP_BINDING=0.0.0.0 # This can be changed to e.g. 127.0.0.1 if you want to run AIO behind a web server or reverse proxy (like Apache, Nginx and else) and if that is running on the same host and using localhost to connect|' sample.conf sed -i 's|TALK_PORT=|TALK_PORT=3478 # This allows to adjust the port that the talk container is using.|' sample.conf diff --git a/php/containers.json b/php/containers.json index 5c3e02fd..618a7d67 100644 --- a/php/containers.json +++ b/php/containers.json @@ -160,8 +160,7 @@ "TRUSTED_CACERTS_DIR=%NEXTCLOUD_TRUSTED_CACERTS_DIR%", "STARTUP_APPS=%NEXTCLOUD_STARTUP_APPS%", "ADDITIONAL_APKS=%NEXTCLOUD_ADDITIONAL_APKS%", - "ADDITIONAL_PHP_EXTENSIONS=%NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS%", - "SKIP_DATA_DIRECTORY_PERMISSION_CHECK=%SKIP_DATA_DIRECTORY_PERMISSION_CHECK%" + "ADDITIONAL_PHP_EXTENSIONS=%NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS%" ], "restart": "unless-stopped", "devices": [ diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 1c257946..ad733439 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -739,14 +739,6 @@ class ConfigurationManager return false; } - public function shouldDataDirectoryPermissionCheckGetSkipped() : bool { - $datadir = $this->GetNextcloudDatadirMount(); - if ($datadir === 'nextcloud_aio_nextcloud_datadir' || str_starts_with($datadir, '/run/desktop/mnt/host/')) { - return true; - } - return false; - } - public function GetNextcloudStartupApps() : string { $apps = getenv('NEXTCLOUD_STARTUP_APPS'); if (is_string($apps)) { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 3e5f7def..63089611 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -348,12 +348,6 @@ class DockerActionManager $replacements[1] = $this->configurationManager->GetNextcloudAdditionalApks(); } elseif ($out[1] === 'NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS') { $replacements[1] = $this->configurationManager->GetNextcloudAdditionalPhpExtensions(); - } elseif ($out[1] === 'SKIP_DATA_DIRECTORY_PERMISSION_CHECK') { - if ($this->configurationManager->shouldDataDirectoryPermissionCheckGetSkipped()) { - $replacements[1] = 'yes'; - } else { - $replacements[1] = ''; - } } else { $secret = $this->configurationManager->GetSecret($out[1]); if ($secret === "") {