Maintenance mode can not be activated

Hello everybody,

I’m still a beginner on Nextcloud.

My setup:

Nextcloud version:
Operating system and version: openmediavault 4
Apache or nginx version: 1.14.2
PHP version: 7.2.13
mysql Version: 10.3.11
Docker and MariaDB

Following problem:

I want to enable maintenance mode and get the following error (i’m logged in as root@omv):

PHP Warning: require_once (/ sharedfolders /…/ www / nextcloud / console.php): failed to open m: Permission denied in /sharedfolders/…/www/nextcloud/occ on line 11
PHP Fatal error: require_once (): Failed opening required '/sharedfolders/…/www/nextclo
nsole.php ‘(include_path =’.: / usr / share / php ') in /…/www/nextcloud/occ on l1

Thanks for your help and greetings

how do you tried to activate the maintenance mode? something like ‘sudo -u www-data php /var/www//html/nextcloud/occ’, maybe dont do it as root, do it as normal user with sudo an do with the rights of www-data

I tried it via:
sudo -u www-data php occ maintenance: mode -on

I only have the root-user

Hmmm, than I have no more idea, but only have a root is not what i do on regular base.

Not if this was just a problem with pasting here, but there is a space too much. Anyway, could you try to use the full path to occ? For example (and notice the maintenance:mode --on without space):

sudo -u www-data php /sharedfolder/<myfolder>/www/nextcloud/occ maintenance:mode --on

thank you

i managed to get the user root the permissions, but now the following message appears:

Could not open input file: occ

What? :open_mouth:
Don’t mess things up :smiley:

Please provide the output of ls -l for your nextcloud directory. We should better check the permissions now.

My Nextcloud is running over docker.

I found out that I have to switch to the image via:

docker exec -it - user www-data ‘container’ bash

Does anyone know how to activate the maintenance mode? Do I need to open the image of nextcloud or the nextcloud database?

‘cd /sharedfolders/…/www/nextcloud’ is not working in the image.


ls -l

i get:

-rwxrwxrwx 1 User1 users 283 Dez 10 11:21 occ

only User1, no root

Do I have to log on as User1?