Apache server won't start after restoring Linode backup image (permission error)

Hi all,

I’ve been testing out Nextcloud on a Linode server, and been using the Nextcloud AIO Docker image. I don’t want to use it as a daily driver for my clouding needs before I am confident I can run it without risking too much. It’s mostly been snag-free so far, but now I have run into a problem.

I wanted to see if I could restore the server to a backup image on the Linode server. The restoration seems to go fine, and all containers start up fine except the Apache web server. It fails to read a config file due to permission error:

apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/sites-enabled/000-default.conf: Permission denied 

This happens on images both before and after upgrade from Nextcloud 24 to 25 (AIO versions 3.x.x to 4.0.1 I think, I’m not sure where to check when everything is down).

I am not entirely sure where to start with this - searching for the solution online has gotten me nowhere so far.

Hi, not sure what is wrong with your server but we definitely delete this file so it should not exist.

But anyhow, can you try to run

sudo docker exec -it --user root nextcloud-aio-apache rm /etc/apache2/sites-enabled/000-default.conf
sudo docker restart nextcloud-aio-apache

And check if that makes it work?

1 Like

That worked perfectly! Thank you.

Would it be helpful for you at all if I tried to recreate this error again to find out what causes it?

I cannot reproduce the issue. Also we delete the site already. See all-in-one/Dockerfile at dc74c2f94f9484b3f868630cd0a630aed7ec92d2 · nextcloud/all-in-one · GitHub. So really no idea what is causing this.

Tried this again, and I get the same error, and the same fix solves it (so I consider this solved, again thank you!). The error did not show up after the initial install, so the Docker installation would have run perfectly fine (incl deletion of the file). It is just that it is somehow restored during restoration from server image (where it has been deleted). Could this be a Linode-specific issue?

If I run find with root, there are still several files named this in different diff and merged folders in the overlay2-folder, in folders named with long hash values. I don’t understand whether this has any significance or not.

EDIT: To clarify, I tried with a newly created server image of a running instance where this was already solved, not the same image as caused the error before.

Possible, yes