Thanks for your response , but after reading and testing it seems my original was “nearly” correct…
you are correct nextcloud normally requires this type of structure to execute commands, but in different shell environments that structure can change.
For my ISPConfig jailkit environment where www-data is actually the name of the webroot “web17” and sudo is disallowed… my command to execute nextcloud occ should be:
$/bin/php7.3 ./occ integrity:check-core` Where php7.3 is the version of php run by server, which is different from php .
But I still get the following error with the correct command:
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"user_ispconfig","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"appointments","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"apporder","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"audioplayer_editor","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"audioplayer_sonos","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"camerarawpreviews","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"serverDI","method":"","url":"--","message":"The requested alias \"PreviewManager\" is deprecated. Please request \"OCP\\IPreview\" directly. This alias will be removed in a future Nextcloud version.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"contacts","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"files_antivirus","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"drawio","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"encryption","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"extract","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"files_sharing","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"keeweb","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"maps","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":2,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"filesystem","method":"","url":"--","message":"Storage wrapper 'sharepermissions' was not registered via the 'OC_Filesystem - preSetup' hook which could cause potential problems.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"user_usage_report","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"metadata","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"ocdownloader","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"scanner","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"suspicious_login","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"transmission","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"video_converter","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"new parser added : FeedIo\\Standard\\Json","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"new parser added : FeedIo\\Standard\\Atom","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"new parser added : FeedIo\\Standard\\Rss","userAgent":"--","version":"21.0.3.1"}
{"reqId":"Ykl9R7TRQ6T1TbaJjz1m","level":0,"time":"2021-11-17T14:40:05+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"new parser added : FeedIo\\Standard\\Rdf","userAgent":"--","version":"21.0.3.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/21/go.php?to=admin-dir_permissions
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /web/lib/private/Console/Application.php:168
Stack trace:
#0 /web/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /web/occ(11): require_once('/web/console.ph...')
If they output indicates that my understanding is incorrect, please me know. I don;t feel comfortable using nextcloud until I can get the occ to work properly