Guten Morgen allerseits,
ich hatte am WE (mal wieder) das Problem, dass meine EiWoMiSau-Nextcloud-Installation beim Update in einen 504 gelaufen ist. Bei einer anderen Installation (beim ausgestorbenen Uhrzeitwesen ausm Saarland) bin ich dazu übergegangen die Updates über die Shell einzuspielen. Bisher auch recht erfolgreich.
Leider macht Netcup jedoch "obskure Magie" die dafür sorgt, dass die PHP Aufrufe aus der Shell anders behandelt werden als via Webserver. Die unterschiedlichen Threads aus dem Forum habe ich versucht anzuwenden. Es scheitert jedoch nach wie vor . Mein Errorlog von gestern wurde geniale 38(!) GB groß.
In der Shell bekomme ich für OCC Status folgende Fehlermeldung:
bash-4.3$ /usr/local/php70/bin/php nxc.hosting123456.abcde.netcup.net/nxc/occ status
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
PHP Warning: fileperms(): stat failed for /var/www/vhosts/hosting123456.abcde.netcup.net/nxc.hosting123456.abcde.netcup.net/nxc/data/nextcloud.log in /nxc.hosting123456.abcde.netcup.net/nxc/lib/private/Log/File.php on line 136
{"reqId":"ezPxvxifdHlxdf3WuHhn","level":3,"time":"2018-06-18T08:46:14+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"file_get_contents(\/var\/www\/vhosts\/hosting123456.abcde.netcup.net\/nxc.hosting123456.abcde.netcup.net\/nxc\/data\/news\/config\/config.ini): failed to open stream: No such file or directory at \/nxc.hosting123456.abcde.netcup.net\/nxc\/lib\/private\/Files\/Storage\/Local.php#214","userAgent":"--","version":"13.0.2.1"}
PHP Warning: fileperms(): stat failed for /var/www/vhosts/hosting123456.abcde.netcup.net/nxc.hosting123456.abcde.netcup.net/nxc/data/nextcloud.log in /nxc.hosting123456.abcde.netcup.net/nxc/lib/private/Log/File.php on line 136
{"reqId":"ezPxvxifdHlxdf3WuHhn","level":3,"time":"2018-06-18T08:46:14+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fileperms(): stat failed for \/var\/www\/vhosts\/hosting123456.abcde.netcup.net\/nxc.hosting123456.abcde.netcup.net\/nxc\/data\/nextcloud.log at \/nxc.hosting123456.abcde.netcup.net\/nxc\/lib\/private\/Log\/File.php#136","userAgent":"--","version":"13.0.2.1"}
{"reqId":"ezPxvxifdHlxdf3WuHhn","level":2,"time":"2018-06-18T08:46:14+00:00","remoteAddr":"","user":"--","app":"news","method":"--","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"13.0.2.1"}
PHP Warning: fileperms(): stat failed for /var/www/vhosts/hosting123456.abcde.netcup.net/nxc.hosting123456.abcde.netcup.net/nxc/data/nextcloud.log in /nxc.hosting123456.abcde.netcup.net/nxc/lib/private/Log/File.php on line 136
{"reqId":"ezPxvxifdHlxdf3WuHhn","level":3,"time":"2018-06-18T08:46:14+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"mkdir(): Permission denied at \/nxc.hosting123456.abcde.netcup.net\/nxc\/apps\/news\/lib\/AppInfo\/Application.php#143","userAgent":"--","version":"13.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/13/go.php?to=admin-dir_permissions
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /nxc.hosting123456.abcde.netcup.net/nxc/lib/private/Console/Application.php:148
Stack trace:
#0 /nxc.hosting123456.abcde.netcup.net/nxc/console.php(89): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /nxc.hosting123456.abcde.netcup.net/nxc/occ(11): require_once('/nxc.hosting106...')
#2 {main}PHP Warning: fileperms(): stat failed for /var/www/vhosts/hosting123456.abcde.netcup.net/nxc.hosting123456.abcde.netcup.net/nxc/data/nextcloud.log in /nxc.hosting123456.abcde.netcup.net/nxc/lib/private/Log/File.php on line 136
{"reqId":"ezPxvxifdHlxdf3WuHhn","level":3,"time":"2018-06-18T08:46:14+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"fileperms(): stat failed for \/var\/www\/vhosts\/hosting123456.abcde.netcup.net\/nxc.hosting123456.abcde.netcup.net\/nxc\/data\/nextcloud.log at \/nxc.hosting123456.abcde.netcup.net\/nxc\/lib\/private\/Log\/File.php#136","userAgent":"--","version":"13.0.2.1"}
{"reqId":"ezPxvxifdHlxdf3WuHhn","level":3,"time":"2018-06-18T08:46:14+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"chmod(): No such file or directory at \/nxc.hosting123456.abcde.netcup.net\/nxc\/lib\/private\/Log\/File.php#137","userAgent":"--","version":"13.0.2.1"}
bash-4.3$
Alles anzeigen
In meiner Config habe ich die folgenden 2 Varianten ausprobiert. (Auf Grundlage eines Tipps aus dem Forum.)
'datadirectory' => '/var/www/vhosts/hosting123456.a2f1b.netcup.net/nxc.hosting123456.abcde.netcup.net/nxc/data',
//'datadirectory' => ((php_sapi_name() != 'cli') ? '/var/www/vhosts/hosting123456.a2f1b.netcup.net/nxc.hosting123456.abcde.netcup.net/nxc/' : '') . 'data',
Leider auch hier beides Mal ohne viel Erfolg.
Gibt es noch andere Stellschrauben die man drehen muss um Nextcloud in die Shell zu bekommen?