How to use occ commands on a Shared Hosting without SSH access

Thanks a lot, this is a great app!
Even with ssh available I would use it because now I can manage occ commands in the backend as long as the cloud isn’t in maintenance mode.

Seeing all the power in that app makes me feel bad about security :-/
You can do a lot of bad things.

IMHO you have to force 2FA for admins after having such a powerful in App Store.

Any other opinions regarding security?

Hey,

the author of OCC Web made an update and now your are ready to use it for NC 18 as well.

My concern with this app is if there are any potential attack vectors for a regular user or an attacker without logging in.

I suppose you could disable the app and enable only when needed though.

I do not just disable it. I delete it if not needed.

Hi
Im totaly new with this
can you Pls tel me the command to solve this
I am on 1und1

As written, install the OCC Web app to get access to the console :wink:

THX for help
App Installed and can open it in NC 18.0.1 RC1
what’s next

Try to execute the occ command. If it succeeds, you can try to run db:add-missing-indices (on your own risk :wink:).

Great THX

there is another message:

Can You Pls Help again?

I think you cannot run the mentioned command in a hosted environment without shell access, because it need to be run in “offline” (maintenance) mode. I would recommend to contact the support of your hoster and ask them to run the command on your database or if you’ve e.g. phpmyadmin available you can try to modify the table settings manually.

I have seen it somewhere at 1und1 interface

I’m confused which database I have used for Nextcloud
Where can I see the name of the database in Nextcloud?

In System there si only:
grafik

I started new Thread because it seems that its not possible to be solved with OCC Commands (it needs to be run in “offline” (maintenance) mode)

NO!

It worked
grafik

Great tool!

Can one or more from this also be solved with Web OCC

I tried:grafik

What can I do?
Is there a download for this App?, where to put it for installation?

  • Strict-Transport-Header” is a web server related setting. Please use the search function of the forum for further details.
  • PHP-Memory-Cache”, like Redis, need to be installed on your system. Please check the provided installation tool of your provider how to install it and the Nextcloud documentation on how to configure it.
  • PHP-Opcache”, like the Zend extension, need to be installed on your system. Please check the provided installation tool of your provider how to install it and the Nextcloud documentation on how to configure it.
  • php-imagick” is not a Nextcloud, but a system program. Please check the provided installation tool of your provider how to install it and the Nextcloud documentation on how to configure it.
1 Like

Can something be done with the other messages?

Where to check?
Is really nobody in the forum who has hosted installation on 1und1 and knows the steps?

I recommend calling the support hotline of your hoster for all the php related stuff.
I assume, that in the default installation, some php modules are missing and you cannot install them with cPanel or similar.
Ask them, if they can help you and maybe install the missing php modules.
Or they can give you some hints, how you can do this on your own.

If this is not possible by your hoster or they don’t want to do this, you have to decide wether you can live with this limitations or you need a Nextcloud installation on your own vps/dedicated server with full root access…

The author of the OCC WebApp does not longer support Nextcloud versions higher 19. Is there any possibility to run the OCC comands like the files scan without having SSH access on a shared hosting?

Does anybody have more information?

On some hosters it is possible to use a separate PHP-file to perform occ commands. It depends on the settings of the hoster though, whether that will work or not (it works with mine). It might be worth a try:

  1. create a file on your webspace called occ-command.php (or whatever you wanna call it) with the following content (adjust RELATIVE/PATH/TO/occ to point to your occ in the nextcloud-installation folder; also the path to php possibly needs to be adjusted):
    <?php 
       exec("/usr/bin/php -d memory_limit=1024M RELATIVE/PATH/TO/occ -n status > occ_result.txt");
       exec("echo \"Command completed!\" >> occ-result.txt");
       header('Location: occ-result.txt');
    ?>
    
  2. visit occ-command.php with a browser
  3. after executing the command, the browser will be redirected to a logfile (occ-result.txt)
  4. for security reasons it is better to delete occ-command.php and occ-result.txt from your webserver when you are done.
3 Likes