I have been trying to get nextcloud up and running on my arch install for the last few days. I’ve got nginx, php, and mariadb installed and setup. When trying to access nextcloud from my browser using localhost to perform the initial setup i receive ‘Internal Server Error’. Logs below.
01T19:55:54+00:00","remoteAddr":"127.0.0.1","user":"--",<br>
"app":"PHP","method":"GET","url":"/","message":"touch(): Utime failed: <br>
Permission denied at /usr/share/webapps/nextcloud/lib/private<br>
/Config.php#263","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:103.0) <br>
Gecko/20100101 Firefox/103.0","version":"","exception":<br>
{"Exception":"Error","Message":"touch(): Utime failed: Permission denied at <br>
/usr/share/webapps/nextcloud/lib/private/Config.php#263","Code":0,"Trace":<br>
[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},<br>
{"file":"/usr/share/webapps/nextcloud/lib/private<br>
/Config.php","line":263,"function":"touch"},{"file":"/usr/share/webapps<br>
/nextcloud/lib/private<br>
/Config.php","line":143,"function":"writeData","class":"OC\\Config","type":"->"},<br>
{"file":"/usr/share/webapps/nextcloud/lib/private<br>
/SystemConfig.php","line":142,"function":"setValue","class":"OC\\Config","type"<br>
:"->"},{"file":"/usr/share/webapps/nextcloud/lib/private/legacy/OC_Util.php",<br>
"line":906,"function":"setValue","class":"OC\\SystemConfig","type":"->"},<br>
{"file":"/usr/share/webapps/nextcloud/lib/base.php","line":427,"function":"getInstanceId","class":"OC_Util","type":"::"},{"file":"/usr/share/webapps/nextcloud/lib/base.php",<br>
"line":659,"function":"initSession","class":"OC","type":"::"},<br>
{"file":"/usr/share/webapps/nextcloud<br>
/lib/base.php","line":1104,"function":"init","class":"OC","type":"::"},<br>
{"file":"/usr/share/webapps/nextcloud/index.php","line":34,<br>
"args":["/usr/share/webapps/nextcloud/lib/base.php"],"function":<br>
"require_once"}],"File":"/usr/share/webapps/nextcloud/lib/private/Log/ErrorHandler.php",<br>
"Line":92,"CustomMessage":"--"}}
results of sudo ls -la /usr/share/webapps/nextcloud
type or paste drwxr-x--- 14 http http 4096 Jul 1 15:53 .
drwxr-xr-x 4 root root 4096 Jul 1 16:19 ..
drwxr-xr-x 43 http http 4096 Jul 1 15:42 3rdparty
drwxr-x--- 48 http http 4096 Jul 1 15:42 apps
-rw-r--r-- 1 http http 19327 Jun 20 17:06 AUTHORS
lrwxrwxrwx 1 http http 29 Jun 20 17:06 config -> /etc/webapps/nextcloud/config
-rw-r--r-- 1 http http 4095 Jun 20 17:06 console.php
-rw-r--r-- 1 http http 34520 Jun 20 17:06 COPYING
drwxr-xr-x 22 http http 4096 Jul 1 15:42 core
-rw-r--r-- 1 http http 6260 Jun 20 17:06 cron.php
drwxr-x--- 2 http http 4096 Jul 1 15:55 data
drwxr-xr-x 2 http http 12288 Jul 1 15:42 dist
lrwxrwxrwx 1 http http 32 Jun 20 17:06 .htaccess -> /etc/webapps/nextcloud/.htaccess
-rw-r--r-- 1 http http 156 Jun 20 17:06 index.html
-rw-r--r-- 1 http http 3456 Jun 20 17:06 index.php
drwxr-xr-x 6 http http 4096 Jul 1 15:42 lib
-rwxr-xr-x 1 http http 283 Jun 20 17:06 occ
drwxr-xr-x 2 http http 4096 Jul 1 15:42 ocm-provider
drwxr-xr-x 2 http http 4096 Jul 1 15:42 ocs
drwxr-xr-x 2 http http 4096 Jul 1 15:42 ocs-provider
-rw-r--r-- 1 http http 3139 Jun 20 17:06 public.php
-rw-r--r-- 1 http http 5340 Jun 20 17:06 remote.php
drwxr-xr-x 4 http http 4096 Jul 1 15:42 resources
-rw-r--r-- 1 http http 26 Jun 20 17:06 robots.txt
-rw-r--r-- 1 http http 2452 Jun 20 17:06 status.php
drwxr-xr-x 3 http http 4096 Jul 1 15:42 themes
drwxr-xr-x 2 http http 4096 Jul 1 15:42 updater
-rw-r--r-- 1 http http 101 Jun 20 17:06 .user.ini
-rw-r--r-- 1 http http 382 Jun 20 17:06 version.php
lrwxrwxrwx 1 http http 23 Jun 20 17:06 wapps -> /var/lib/nextcloud/appscode here
output of /etc/webapps/nextcloud/config/config.php
type or pas?php
$CONFIG = array (
'trusted_domains' =>
[
'localhost'
'example.com'
'internal.ip.addr.example',
],
‘overwritehost’ => ‘example.com’,
‘overwriteprotocol’ => ‘https’,
‘overwritewebroot’ => ‘/’,
‘trusted_proxies’ =>
array (
0 => ‘127.0.0.1’,
),
‘overwrite.cli.url’ => ‘https://example.com’,
'dbtype' => 'mysql',
'dbname' => 'nextcloud'
'dbhost' => 'localhost',
'datadirectory' => '/var/lib/nextcloud/data',
'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,
],
],
);