3

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!

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.
  • Setting 'installed' => false in the config.php changes the occ behavior 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 ./occ the 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!

I also asked this question on both the Nextcloud Forum and the Manjaro Forum and will update all links if I find a solution.

A-V Labs
  • 161
  • 1
  • 4

1 Answers1

2

By pure coincidence I found out about a setup which works. All relevant directories need write permissions for both the new user "nextcloud" and the user "http".

E.g. the config directories permissions are correct when user=nextcloud group=http and permissions are 775. The config.php on the other hand works with 660. Here's the catch: Nextcloud overwrites the file's permissions back to 640 when maintenance mode is turned on for example. The other directories apps, and data also need wirte permissions both for nextcloud and http user.

A-V Labs
  • 161
  • 1
  • 4