[Solved] Fails to set maintenance mode


As suggested on the Security & setup warnings I was trying to change MariaDB following this tutorial: https://docs.nextcloud.com/server/20/admin_manual/configuration_database/mysql_4byte_support.html

However when I run the following command It says I can’t write into config directory.

admin-user@raspberrypi:/srv/dev-disk-by-label-OS/appdata/nextcloud/config/www/nextcloud$ sudo -u www-data php occ maintenance:mode --on
Cannot write into "config" directory!
This can usually be fixed by giving the webserver write access to the config directory

Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.
See https://docs.nextcloud.com/server/20/go.php?to=admin-config
{"reqId":"LvBpz8ZBaqKOgUyhLifT","level":3,"time":"2022-05-21T00:27:19+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /srv/dev-disk-by-label-OS/appdata/nextcloud/config/www/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18","userAgent":"--","version":""}

Nextcloud version (eg, 20.0.5): 20.0.14
Operating system and version (eg, Ubuntu 20.04): Linux raspberrypi 5.4.79-v7l+ #1373 SMP Mon Nov 23 13:27:40 GMT 2020 armv7l GNU/Linux
PHP version (eg, 7.4): 7.3.25

I was using the wrong user. In my installation the user isn’t www-data