Thanks for the reply mate. I did have a second usbdrive for the database backups from beginning on, never had any problem with it. I just took it out and rebooted to try, it worked for a minute and then gave the same error again. I can access the device via ssh and NCP webui⌠âls -lh /media/â output is âtotal 0â . Here is the âsudo ncp-reportâ output if it helps:
NextCloudPi diagnostics
PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 85
{"reqId":"JXNdTLXSIZXJePESaxv0","level":3,"time":"2020-01-25T19:15:02+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fileperms(): stat failed for \/media\/USBdrive\/ncdata\/nextcloud.log at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#85","userAgent":"--","version":"17.0.2.1"}
{"reqId":"JXNdTLXSIZXJePESaxv0","level":2,"time":"2020-01-25T19:15:02+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory \/media\/USBdrive\/ncdata\/tmp is not present or writable","userAgent":"--","version":"17.0.2.1"}
PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 85
{"reqId":"JXNdTLXSIZXJePESaxv0","level":3,"time":"2020-01-25T19:15:03+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(\/media\/USBdrive\/ncdata\/news\/config\/config.ini): failed to open stream: No such file or directory at \/var\/www\/nextcloud\/lib\/private\/Files\/Storage\/Local.php#217","userAgent":"--","version":"17.0.2.1"}
PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 85
{"reqId":"JXNdTLXSIZXJePESaxv0","level":3,"time":"2020-01-25T19:15:03+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fileperms(): stat failed for \/media\/USBdrive\/ncdata\/nextcloud.log at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#85","userAgent":"--","version":"17.0.2.1"}
{"reqId":"JXNdTLXSIZXJePESaxv0","level":2,"time":"2020-01-25T19:15:03+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"17.0.2.1"}
PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 85
{"reqId":"JXNdTLXSIZXJePESaxv0","level":3,"time":"2020-01-25T19:15:03+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"mkdir(): Permission denied at \/var\/www\/nextcloud\/apps\/news\/lib\/AppInfo\/Application.php#142","userAgent":"--","version":"17.0.2.1"}
PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 85
{"reqId":"JXNdTLXSIZXJePESaxv0","level":3,"time":"2020-01-25T19:15:03+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fileperms(): stat failed for \/media\/USBdrive\/ncdata\/nextcloud.log at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#85","userAgent":"--","version":"17.0.2.1"}
{"reqId":"JXNdTLXSIZXJePESaxv0","level":3,"time":"2020-01-25T19:15:03+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"chmod(): No such file or directory at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#86","userAgent":"--","version":"17.0.2.1"}
NextCloudPi version v1.20.1
NextCloudPi image NextCloudPi_07-21-19
distribution Raspbian GNU/Linux 10 \n \l
automount yes
USB devices none
datadir /media/USBdrive/ncdata (doesn't exist)
rootfs usage 2.6G/29G
swapfile /var/swap
dbdir /var/lib/mysql
Nextcloud check error
HTTPD service up
PHP service up
MariaDB service up
Redis service up
Postfix service up
internet check ok
port check 80 open
port check 443 open
IP ***REMOVED SENSITIVE VALUE***
gateway ***REMOVED SENSITIVE VALUE***
interface eth0
certificates ***REMOVED SENSITIVE VALUE***
NAT loopback no
uptime 1min
Nextcloud configuration
PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 85
{"reqId":"UoM2GUptAxDbwjeMODx6","level":3,"time":"2020-01-25T19:15:07+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fileperms(): stat failed for \/media\/USBdrive\/ncdata\/nextcloud.log at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#85","userAgent":"--","version":"17.0.2.1"}
{"reqId":"UoM2GUptAxDbwjeMODx6","level":2,"time":"2020-01-25T19:15:07+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory \/media\/USBdrive\/ncdata\/tmp is not present or writable","userAgent":"--","version":"17.0.2.1"}
PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 85
{"reqId":"UoM2GUptAxDbwjeMODx6","level":3,"time":"2020-01-25T19:15:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(\/media\/USBdrive\/ncdata\/news\/config\/config.ini): failed to open stream: No such file or directory at \/var\/www\/nextcloud\/lib\/private\/Files\/Storage\/Local.php#217","userAgent":"--","version":"17.0.2.1"}
PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 85
{"reqId":"UoM2GUptAxDbwjeMODx6","level":3,"time":"2020-01-25T19:15:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fileperms(): stat failed for \/media\/USBdrive\/ncdata\/nextcloud.log at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#85","userAgent":"--","version":"17.0.2.1"}
{"reqId":"UoM2GUptAxDbwjeMODx6","level":2,"time":"2020-01-25T19:15:08+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"17.0.2.1"}
PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 85
{"reqId":"UoM2GUptAxDbwjeMODx6","level":3,"time":"2020-01-25T19:15:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"mkdir(): Permission denied at \/var\/www\/nextcloud\/apps\/news\/lib\/AppInfo\/Application.php#142","userAgent":"--","version":"17.0.2.1"}
Your data directory is invalid
Ensure there is a file called ".ocdata" in the root of the data directory.
Cannot create "data" directory
This can usually be fixed by giving the webserver write access to the root directory. See https://docs.nextcloud.com/server/17/go.php?to=admin-dir_permissions
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:166
Stack trace:
#0 /var/www/nextcloud/console.php(96): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#2 {main}PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 85
{"reqId":"UoM2GUptAxDbwjeMODx6","level":3,"time":"2020-01-25T19:15:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fileperms(): stat failed for \/media\/USBdrive\/ncdata\/nextcloud.log at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#85","userAgent":"--","version":"17.0.2.1"}
{"reqId":"UoM2GUptAxDbwjeMODx6","level":3,"time":"2020-01-25T19:15:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"chmod(): No such file or directory at \/var\/www\/nextcloud\/lib\/private\/Log\/File.php#86","userAgent":"--","version":"17.0.2.1"}
HTTPd logs
[Sat Jan 25 19:14:23.908380 2020] [authz_host:error] [pid 842:tid 2755929120] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /js/minified.js failed, reason: unable to get the remote host name
[Sat Jan 25 19:14:23.917017 2020] [authz_host:error] [pid 842:tid 2772730912] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /css/ncp.css failed, reason: unable to get the remote host name
[Sat Jan 25 19:14:23.924974 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/ncp-logo.svg failed, reason: unable to get the remote host name
[Sat Jan 25 19:14:24.038314 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/toggle.svg failed, reason: unable to get the remote host name
[Sat Jan 25 19:14:24.043370 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/defaults.svg failed, reason: unable to get the remote host name
[Sat Jan 25 19:14:24.057771 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/poweroff.svg failed, reason: unable to get the remote host name
[Sat Jan 25 19:14:24.067508 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/reboot.svg failed, reason: unable to get the remote host name
[Sat Jan 25 19:14:24.152874 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/poweroff.svg failed, reason: unable to get the remote host name, referer: https://192.168.178.148:4443/css/ncp.css
[Sat Jan 25 19:14:24.153191 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/dashboard.svg failed, reason: unable to get the remote host name, referer: https://192.168.178.148:4443/css/ncp.css
[Sat Jan 25 19:14:24.153659 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/search.svg failed, reason: unable to get the remote host name, referer: https://192.168.178.148:4443/css/ncp.css
[Sat Jan 25 19:14:24.155841 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/defaults-white.svg failed, reason: unable to get the remote host name, referer: https://192.168.178.148:4443/css/ncp.css
[Sat Jan 25 19:14:24.156167 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/nc-button.svg failed, reason: unable to get the remote host name, referer: https://192.168.178.148:4443/css/ncp.css
[Sat Jan 25 19:14:24.156536 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/settings-white.svg failed, reason: unable to get the remote host name, referer: https://192.168.178.148:4443/css/ncp.css
[Sat Jan 25 19:14:24.156864 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/info-white.svg failed, reason: unable to get the remote host name, referer: https://192.168.178.148:4443/css/ncp.css
[Sat Jan 25 19:14:24.157202 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/files.svg failed, reason: unable to get the remote host name, referer: https://192.168.178.148:4443/css/ncp.css
[Sat Jan 25 19:14:24.157530 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /img/wizard.svg failed, reason: unable to get the remote host name, referer: https://192.168.178.148:4443/css/ncp.css
[Sat Jan 25 19:14:24.169074 2020] [authz_host:error] [pid 842:tid 2781131808] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /ncp-output.php failed, reason: unable to get the remote host name
[Sat Jan 25 19:14:24.211573 2020] [authz_host:error] [pid 842:tid 2772730912] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Sat Jan 25 19:14:29.716752 2020] [authz_host:error] [pid 842:tid 2772730912] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
[Sat Jan 25 19:14:29.746482 2020] [authz_host:error] [pid 842:tid 2772730912] [client 192.168.178.114:48384] AH01753: access check of 'localhost' to /ncp-launcher.php failed, reason: unable to get the remote host name
Database logs
2020-01-25 19:14:10 0 [Note] InnoDB: Uses event mutexes
2020-01-25 19:14:10 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-01-25 19:14:10 0 [Note] InnoDB: Number of pools: 1
2020-01-25 19:14:10 0 [Note] InnoDB: Using generic crc32 instructions
2020-01-25 19:14:10 0 [Note] InnoDB: Initializing buffer pool, total size = 1.625G, instances = 1, chunk size = 128M
2020-01-25 19:14:10 0 [Note] InnoDB: Completed initialization of buffer pool
2020-01-25 19:14:10 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-01-25 19:14:11 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-01-25 19:14:11 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-01-25 19:14:11 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-01-25 19:14:11 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-01-25 19:14:11 0 [Note] InnoDB: 10.3.17 started; log sequence number 1725411767; transaction id 5415222
2020-01-25 19:14:11 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-01-25 19:14:11 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-01-25 19:14:11 0 [Note] Server socket created on IP: '127.0.0.1'.
2020-01-25 19:14:11 0 [Note] Reading of all Master_info entries succeeded
2020-01-25 19:14:11 0 [Note] Added new Master_info '' to hash table
2020-01-25 19:14:11 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.17-MariaDB-0+deb10u1' socket: '/run/mysqld/mysqld.sock' port: 3306 Raspbian 10
2020-01-25 19:14:13 0 [Note] InnoDB: Buffer pool(s) load completed at 200125 19:14:13
Nextcloud logs
tail: cannot open '/media/USBdrive/ncdata/nextcloud.log' for reading: No such file or directory