Cannot run occ in jailshell

I am trying to manually upgrade a formerly working but now broken nextcloud installation on a hosted web server.

My command line access is SSH into a jailshell. I cannot use sudo.
All files are owned by my username. Unlike normal, html files do not seem to be owned by www-data.

Now the problem: When I run “php occ” from an command prompt, I receive an error “This script can be run from the command line only”.

Is this because I am not using sudo, or is there maybe a different issue?

Thank you

For the occ commands you’ll need sudo so you can run the command as the www user