Alternative title: I f***** up. How do i unf*** my installation?
I’m actually sorry
I recently had a low point in my life and ran something like
sudo chown -R $USER:$USER nextcloud-bind from my host machine. (
nextcloud-bind is mounted at
/var/www/html inside the container). Needless to say, it blew it up.
docker-compose.yaml is very simple: image is
nextcloud:24, there’s a single volume bind as described above and everything else is just related to networking, which is unrelated to my issue.
Here’s the output of running
sudo ls -la (with my normal name being replaced with
abcde) in the mounted directory from the host machine (using pastebin to make this post not as large):
As you can see, i’ve tried to follow the instructions by the Nextcloud error messages and change the owners of
apps dirs back to
www-data. I’ve also tried various flag combinations like 700, 660 etc. on those same directories.
With the permissions as shown above, the error i get when trying to open Nextcloud is still “Cannot write into apps directory…”.
The next thing i did was crank up the log level and enable debug, neither provided me any more information in
nextcloud.log. Unfortunately i can’t run the
occ:log family of commands because
occ dies as well:
www-data@61d511f1ef6d:~/html$ php occ log Cannot write into "apps" directory. This can usually be fixed by giving the web server write access to the apps directory or disabling the App Store in the config file. An unhandled exception has been thrown: Exception: Environment not properly prepared. in /var/www/html/lib/private/Console/Application.php:164 Stack trace: #0 /var/www/html/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #1 /var/www/html/occ(11): require_once('/var/www/html/c...') www-data@61d511f1ef6d:~/html$
The current output from either
docker logs nextcloud or
nextcloud.log don’t appear to give any more detail as well. Here’s one entry i pulled from
nextcloud.log when trying to access the service (there are some weird whitespaces because of the way i copied this from the terminal, the file is fine):
If anyone here has the mercy to help me to fix the mess i’ve made i will be very, very thankful! You guys and girls out there are doing amazing things helping people gain digital sovereignty and i can fully understand if someone says i shot myself in the foot and need to figure it out myself.