Problems when visiting cloud website, log empty

I (still) can’t acces my cloud.
First I created a nextcloud on my raspberrypi using apache. Because I somehow couldn’t set things up from the internet so I used the command line.
If I try to connect to my cloud ther’s an internal problem.
I cleared data/nextcloud.log and reloaded the site. The log file was still empty.
This means I have no Idea what I can do now…

Perhaps you can get an error with this command. Use it with “root” or after “sudo -s”.

sudo -u www-data /path/to/your/nextcloud/index.php

Perhaps you missed a module, activating mod_rewrite, …

Not sure what it is supposed to do :thinking: but it looked harmless so I enterd sudo -u pi index.php (I was already in my nextcloud directorary).
Well, it looks like your command did nothing…
sudo: index.php: Command not found
Anyways: Thanks for your quick reply!

Sorry “php” missed in command :wink:

sudo -u www-data php /path/to/your/nextcloud/index.php

sudo -u pi php index.php

I think “pi” is not your apache2/mariadb/nextcloud user. Look:

ls -l /path/to/your/nextcloud

I did not add a HTTP user.
Anyways: I tried it three times (onece with pi, onece with www-data and onece as root)
Output for pi and www-data:

Cannot write into "config" directory!
This can usually be fixed by giving the webserver write access to the config directory

Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.
See https://docs.nextcloud.com/server/21/go.php?to=admin-config

There was no output for root and the log file was still empty.

Please post the used installation guide to install nextlcoud.

For Nextcloud you need

  • a webserver e.g. apache2 → always www-data
  • a mariadb or mysql → always www-data
  • nextcloud files in /path/to/your/webserver-root/nextcloud → mostly www-data

Please post:
ls -l /path/to/your/webserver-root/nextcloud

All must be owned from www-data including “config” and “config/config.php”.

altogether 152
drwxr-xr-x 43 root root  4096 Apr 20 07:21 3rdparty
drwxr-xr-x 47 root root  4096 Apr 20 07:22 apps
-rwxr-xr-x  1 root root 17900 Apr 20 07:22 AUTHORS
drwxr-xr-x  2 root root  4096 Apr 20 13:34 config
-rwxr-xr-x  1 root root  3900 Apr 20 07:22 console.php
-rwxr-xr-x  1 root root 34520 Apr 20 07:22 COPYING
drwxr-xr-x 22 root root  4096 Apr 20 07:23 core
-rwxr-xr-x  1 root root  5122 Apr 20 07:23 cron.php
drwxrwx---  3 root root  4096 Apr 20 12:31 data
-rwxr-xr-x  1 root root   156 Apr 20 07:23 index.html
-rwxr-xr-x  1 root root  2960 Apr 20 07:23 index.php
drwxr-xr-x  6 root root  4096 Apr 20 07:23 lib
-rwxr-xr-x  1 root root   283 Apr 20 07:23 occ
drwxr-xr-x  2 root root  4096 Apr 20 07:23 ocm-provider
drwxr-xr-x  2 root root  4096 Apr 20 07:23 ocs
drwxr-xr-x  2 root root  4096 Apr 20 07:23 ocs-provider
-rwxr-xr-x  1 root root  3144 Apr 20 07:23 public.php
-rwxr-xr-x  1 root root  5341 Apr 20 07:23 remote.php
drwxr-xr-x  4 root root  4096 Apr 20 07:23 resources
-rwxr-xr-x  1 root root    26 Apr 20 07:23 robots.txt
-rwxr-xr-x  1 root root  2446 Apr 20 07:23 status.php
drwxr-xr-x  3 root root  4096 Apr 20 07:23 themes
drwxr-xr-x  2 root root  4096 Apr 20 07:23 updater
-rwxr-xr-x  1 root root   382 Apr 20 07:23 version.php

Actually I used multiple turotials: The one from rapberrytips.com (https://raspberrytips.com/install-nextcloud-raspberry-pi/) and a german one from YouTube https://www.youtube.com/watch?v=xZW0FB-RwZY.

sudo chown www-data:pi * didn’t help

I reinstalled everything and it worked.

1 Like

I think the first version was installed or configured with “root”. Look again:

ls -l /parh/to/nextcloud