Upgrade from 27.1.4.1 to 27.1.6.2 FAILED - Stuck in maintenance mode 😨

Hey people,

The automatic upgrade of my Nextcloud Snap installation has failed this morning with the following in ‘nextcloud.log’.

I appreciate it most likely is related to SNAP and not directly to Nextcloud (at least I theorize), still any input, advice, hints would be appreciated.

Why is the upgrade process trying to write a file that is mounted in a readonly filesystem?

{"reqId":"QdOhFWBVx11iB3CgY0rA","level":1,"time":"2024-02-11T00:26:20+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","messag
e":"\\OC\\Updater::maintenanceEnabled: Turned on maintenance mode","userAgent":"--","version":"27.1.4.1","data":{"app":"updater"}}
{"reqId":"QdOhFWBVx11iB3CgY0rA","level":0,"time":"2024-02-11T00:26:20+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":
"starting upgrade from 27.1.4.1 to 27.1.6.2","userAgent":"--","version":"27.1.4.1","data":{"app":"core"}}
{"reqId":"QdOhFWBVx11iB3CgY0rA","level":3,"time":"2024-02-11T00:26:20+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"-
-","message":"/snap/nextcloud/40247/htdocs does not have enough space for writing the htaccess file! Not writing it back!","userAgent":"--","version":"
27.1.4.1","exception":{"Exception":"Exception","Message":"/snap/nextcloud/40247/htdocs does not have enough space for writing the htaccess file! Not wr
iting it back!","Code":0,"Trace":[{"file":"/snap/nextcloud/40247/htdocs/lib/private/Updater.php","line":139,"function":"doUpgrade","class":"OC\\Updater
","type":"->"},{"file":"/snap/nextcloud/40247/htdocs/core/Command/Upgrade.php","line":225,"function":"upgrade","class":"OC\\Updater","type":"->"},{"fil
e":"/snap/nextcloud/40247/htdocs/3rdparty/symfony/console/Command/Command.php","line":298,"function":"execute","class":"OC\\Core\\Command\\Upgrade","ty
pe":"->"},{"file":"/snap/nextcloud/40247/htdocs/3rdparty/symfony/console/Application.php","line":1040,"function":"run","class":"Symfony\\Component\\Con
sole\\Command\\Command","type":"->"},{"file":"/snap/nextcloud/40247/htdocs/3rdparty/symfony/console/Application.php","line":301,"function":"doRunComman
d","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/snap/nextcloud/40247/htdocs/3rdparty/symfony/console/Application.php","lin
e":171,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/snap/nextcloud/40247/htdocs/lib/private/Console/App
lication.php","line":211,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/snap/nextcloud/40247/htdocs/console
.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/snap/nextcloud/40247/htdocs/occ","line":11,"args":["/snap/n
extcloud/40247/htdocs/console.php"],"function":"require_once"}],"File":"/snap/nextcloud/40247/htdocs/lib/private/Updater.php","Line":248,"message":"/sn
ap/nextcloud/40247/htdocs does not have enough space for writing the htaccess file! Not writing it back!","exception":{},"CustomMessage":"/snap/nextclo
ud/40247/htdocs does not have enough space for writing the htaccess file! Not writing it back!"}}
{"reqId":"QdOhFWBVx11iB3CgY0rA","level":3,"time":"2024-02-11T00:26:20+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","messag
e":"\\OC\\Updater::failure: Exception: /snap/nextcloud/40247/htdocs does not have enough space for writing the htaccess file! Not writing it back!","us
erAgent":"--","version":"27.1.4.1","data":{"app":"updater"}}
{"reqId":"QdOhFWBVx11iB3CgY0rA","level":3,"time":"2024-02-11T00:26:20+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","messag
e":"\\OC\\Updater::updateEnd: Update failed","userAgent":"--","version":"27.1.4.1","data":{"app":"updater"}}
{"reqId":"QdOhFWBVx11iB3CgY0rA","level":1,"time":"2024-02-11T00:26:20+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","messag
e":"\\OC\\Updater::maintenanceActive: Maintenance mode is kept active","userAgent":"--","version":"27.1.4.1","data":{"app":"updater"}}
{"reqId":"QdOhFWBVx11iB3CgY0rA","level":1,"time":"2024-02-11T00:26:20+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","messag
e":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"27.1.4.1","data":{"app":"updater"}}

So far I understood that everything under /snap/nextcloud/... is mounted readynly and config files are under /var/snap/nextcloud/... (in a Ubuntu system anyway). So why the upgrade suddenly tries to write a readonly location?

Also, any hints on how to downgrade to a previous stable version?

A preliminary look suggests the disk partition that /snap is located on is full.

Also, .htaccess isn’t config file per se, but a part of the installation package. It’s included in and managed by Nextcloud Server itself.