I was running a Apache Server with Nextcloud on a Manjaro (Arch Linux) distribution. The latest upgrade to Nextcloud 21 introduced major changes such as implementing php v8 and a new user “nextcloud” to run the app.
After the upgrade I get an error on the server page: Cannot write into “config” directory! This is the first time I have encountered this after an upgrade.
Obviously I made sure the new nextcloud user is the owner of both the config directory the data directory and the writeable apps directory as the Arch Wiki page suggests.
A few things I found out:
- config.php has permissions 644. If I change that to something more lenient, e.g. 777, I get additional errors (Cannot write into “apps” and data directory)
occcommands terminate with PHP Fatal error: Allowed memory size exhausted in /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 133. If I allow an unlimited amount of memory, the process gets killed after a few seconds.
'installed' => falsein the config.php changes the
occbehavior to output Nextcloud is not installed … but only if I use the binary in /usr/bin/. If I use the occ binary inside the directory
./occthe output is again Cannot write into “config” directory! in the command line.
I am by no means an expert in this and I ran out of ideas. Any suggestions on how to proceed would be much appreciated!
Some suggested information:
Operating system and version:
Manjaro 20.2.1 Nibia
The output of your config.php file:
<?php $CONFIG = array ( 'logfile' => '/var/log/nextcloud/nextcloud.log', 'apps_paths' => [ [ 'path'=> '/usr/share/webapps/nextcloud/apps', 'url' => '/apps', 'writable' => false, ], [ 'path'=> '/var/lib/nextcloud/apps', 'url' => '/wapps', 'writable' => true, ], ], 'dbtype' => 'mysql', 'htaccess.RewriteBase' => '/nextcloud', 'memcache.local' => '\\OC\\Memcache\\APCu', 'maintenance' => false, 'theme' => '', 'loglevel' => '0', );
The output of your Apache/nginx/system log in
[Wed Mar 03 13:55:59.207602 2021] [ssl:warn] [pid 441] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] PHP Warning: Version warning: Imagick was compiled against ImageMagick version 1802 but version 1803 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0 [Wed Mar 03 13:55:59.228167 2021] [mpm_prefork:notice] [pid 441] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.1.1j PHP/8.0.2 configured -- resuming normal operations
I could not find significant information in the Nextcloud logs.