Unable to Access to NextCloud Through Browser

Hi,

I’m not able to access NC 12 through the browser, yet the apache is running, since the default page is showing, so I went to the logs of the apache and I found the following

[Wed Jan 24 11:01:41.515090 2018] [:error] [pid 1760] [client 194.165.136.114:42359] PHP Warning:  fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 133
[Wed Jan 24 11:01:41.515126 2018] [:error] [pid 1760] [client 194.165.136.114:42359] {"reqId":"4TuVkhHpWgXYmbF1VyWL","level":3,"time":"2018-01-24T11:01:41+00:00","remoteAddr":"194.165.136.114","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/index.php","message":"touch(): Unable to create file \\/var\\/www\\/nextcloud\\/config\\/config.php because Permission denied at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Config.php#239","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/63.0.3239.132 Safari\\/537.36","version":""}
[Wed Jan 24 11:01:41.515242 2018] [:error] [pid 1760] [client 194.165.136.114:42359] PHP Warning:  fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 133
[Wed Jan 24 11:01:41.515254 2018] [:error] [pid 1760] [client 194.165.136.114:42359] {"reqId":"4TuVkhHpWgXYmbF1VyWL","level":3,"time":"2018-01-24T11:01:41+00:00","remoteAddr":"194.165.136.114","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/index.php","message":"fopen(\\/var\\/www\\/nextcloud\\/config\\/config.php): failed to open stream: No such file or directory at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Config.php#240","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/63.0.3239.132 Safari\\/537.36","version":""}
[Wed Jan 24 11:01:41.515346 2018] [:error] [pid 1760] [client 194.165.136.114:42359] PHP Warning:  fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 133
[Wed Jan 24 11:01:41.515365 2018] [:error] [pid 1760] [client 194.165.136.114:42359] {"reqId":"4TuVkhHpWgXYmbF1VyWL","level":3,"time":"2018-01-24T11:01:41+00:00","remoteAddr":"194.165.136.114","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/index.php","message":"chmod(): No such file or directory at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Config.php#243","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/63.0.3239.132 Safari\\/537.36","version":""}
[Wed Jan 24 11:01:41.517057 2018] [:error] [pid 1760] [client 194.165.136.114:42359] PHP Warning:  fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 133
[Wed Jan 24 11:01:41.517075 2018] [:error] [pid 1760] [client 194.165.136.114:42359] {"reqId":"4TuVkhHpWgXYmbF1VyWL","level":3,"time":"2018-01-24T11:01:41+00:00","remoteAddr":"194.165.136.114","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/index.php","message":"fileperms(): stat failed for \\/var\\/www\\/nextcloud\\/data\\/nextcloud.log at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Log\\/File.php#133","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/63.0.3239.132 Safari\\/537.36","version":""}
[Wed Jan 24 11:01:41.517092 2018] [:error] [pid 1760] [client 194.165.136.114:42359] {"reqId":"4TuVkhHpWgXYmbF1VyWL","level":3,"time":"2018-01-24T11:01:41+00:00","remoteAddr":"194.165.136.114","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/index.php","message":"Doctrine\\\\DBAL\\\\DBALException: Failed to connect to the database: An exception occured in driver: could not find driver at \\/var\\/www\\/nextcloud\\/lib\\/private\\/DB\\/Connection.php#61","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/63.0.3239.132 Safari\\/537.36","version":""}
[Wed Jan 24 11:01:41.517279 2018] [:error] [pid 1760] [client 194.165.136.114:42359] PHP Warning:  fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 133
[Wed Jan 24 11:01:41.517291 2018] [:error] [pid 1760] [client 194.165.136.114:42359] {"reqId":"4TuVkhHpWgXYmbF1VyWL","level":3,"time":"2018-01-24T11:01:41+00:00","remoteAddr":"194.165.136.114","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/index.php","message":"fileperms(): stat failed for \\/var\\/www\\/nextcloud\\/data\\/nextcloud.log at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Log\\/File.php#133","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/63.0.3239.132 Safari\\/537.36","version":""}
[Wed Jan 24 11:01:41.517326 2018] [:error] [pid 1760] [client 194.165.136.114:42359] {"reqId":"4TuVkhHpWgXYmbF1VyWL","level":3,"time":"2018-01-24T11:01:41+00:00","remoteAddr":"194.165.136.114","user":"--","app":"PHP","method":"GET","url":"\\/nextcloud\\/index.php","message":"chmod(): No such file or directory at \\/var\\/www\\/nextcloud\\/lib\\/private\\/Log\\/File.php#134","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/63.0.3239.132 Safari\\/537.36","version":""}

to me it seems that NC cant write on the nextcloud.log, any idea how to solve this?

Thanks

1 Like

Best way is to make sure the folder it is trying to write into (/var/www/nextcloud/data) is writable by the Apache process owner (most likely www-data). You can do it in 2 ways:

  1. Set the folder-owner to www-data
  2. Change the folder permission to let others write into it.
1 Like

the page is loading now, thanks