Internal server error after move data directory

Hello, i am new here in this community. I hope anyone can help me.
I have changed my data directory. I have moved all files correctly, set the right permissions to the new storage folder.

Now i become an internal server error page.

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

so, but - where can i find the server logfile from nextcloud?

I hope anyone can help me.
Please, when it is possible answer in german. This is much easier for me than english. But i hope my english is also good to understand.

Thanks a lot.

my log file from apache2

[Sun Jul 21 21:09:46.113828 2019] [proxy_fcgi:error] [pid 1551] [client xxx.xxx.xxx.xxx:61609] AH01071: Got error 'PHP message: PHP Warning:  fileperms(): open_basedir restriction in effect. File(/home/cloud/dat'
[Sun Jul 21 21:09:46.115516 2019] [proxy_fcgi:error] [pid 1551] [client xxx.xxx.xxx.xxx:61609] AH01071: Got error 'a/nextcloud.log) is not within the allowed path(s): (/var/www/clients/client1/web47/web:/var/www/clients/client1/web47/priva$

You need to add /home/cloud/data to open_basedir in your php.ini

Ok, i did it. But the same result. The same error page. What is wrong?

Did you restart PHP after editing php.ini?

yes

; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file.
; Note: disables the realpath cache
; http://php.net/open-basedir
open_basedir = /home/cloud/data

I hope this is right.

I use ispconfig3. Is it noteworthy

Please have a look to my phpinfo at this url
https://cloud.edv-jellissen.de/phpinfo.php

Which file exactly did you edit?
You also need to add the directory.
According to your phpinfo the change didnā€™t have any effect.
What is the output of

grep -r open_basedir /etc/php/7.3/fpm | grep -v -E ';'

Hello, i have edit exactly the file

/etc/php/7.3/fpm/php.ini

because this is the active file for my php.

The output from the command below

root@vs02:~# grep -r open_basedir /etc/php/7.3/fpm | grep -v -E ';'
/etc/php/7.3/fpm/php.ini:open_basedir = /home/cloud/data
/etc/php/7.3/fpm/pool.d/web47.conf:php_admin_value[open_basedir] = /var/www/clients/client1/web47/web:/var/www/clients/client1/web47/private:/var/www/clients/client1/web47/tmp:/var/www/cloud.edv-jellissen.de/web:/srv/www/cloud.edv-jellissen.de/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom
  1. undo the change you did in /etc/php/7.3/fpm/php.ini

  2. add (important to add, do not delete anything!)
    :/home/cloud/data
    to the end of the line starting with
    php_admin_value[open_basedir] = /var/www/clients[...]
    in file
    /etc/php/7.3/fpm/pool.d/web47.conf
    and restart php afterwards.

2 Likes

Wooow, it looks great.

Now the issue is fixed/solved.

Thank you very much

1 Like

Glad I could help.
Could you mark it as solution? Thx.

Iā€™m sorry, now i have fresh installation of nextcloud 16.0.3 on the my own server vs01.edv-jellissen.de. Everything looks great, the installation with a different data directory is done. The First Login looks also great, i deleted the default files from my account. Than i go to the ā€œsettingsā€ Tab. And no ā€¦ from the beginning.
ā€œInternal Server errorā€. Iam so frustrated

please, can anyone help me again?

Thanks a lot

For developers i have also upload the phpinfo.php file looks like this
http://cloud.edv-jellissen.de/phpinfo.php

Is there anything in the apache2 log?

I look later.
I thought i have learnd something from the last issue.
So now i have looked for my conf file
in this case the conf file is in
/opt/php-7.2/etc/php-fpm.d/web1.conf

I have eddit the current mount point for the data directory.
/mnt/cloud
an than. It works. I donā€™t no why

when i restart the vserver. This file will be overwritten by ispconfig (i think so).
Hmmmm,

I donā€™t no why.

Is that a different installation or machine than the installation before? Now you are using php7.2, in a different installation pathā€¦

I have a zero knowledge about ispconfig and canā€˜t really be much of a help here. Maybe you can configure open_basedir somewhere in the webpanel of ispconfig?
Or configure Apache to use php7.3 and add the path like before.

Yes, this is a differenz instalation on a differenz machine.

when i make any changes on my config.php with this tutorial
https://docs.nextcloud.com//server/13/admin_manual/configuration_server/caching_configuration.html#id4

i become this error. ā€œInternal Server Errorā€.

When i make changes with APCu, Memcached, Redis, a become this error when i make any changes like this :frowning:

Iā€™m frustrated

Does it work without caching?
Also: which version of Nextcloud are you trying to install? The documentation you are referring to is for Nextcloud 13 which is kind of old.

hello,

yes, until yesterday it works fine. Today i looked up for the URL. Shit. It doesnā€™t work. I donā€™t know.
I didnā€™t have make any changes from yesterday evening to today.

With the tutorial youā€™re right. i used a wrong tutorial. I have installed the version 16.0.3.

Does it work, if you disable caching completely?

what do you mean with ā€œcompletlyā€ ?
i have comment out the sections in the config.php.
Than it works fine for a few moments.

Now i have try to use another php version. I try PHP 7.3 and iam back to PHP7.2.
With this PHP Version 7.2 it works fine for one or two hours and then come the same error. I only uploaded files to nextcloud. I do nothing on the config.php or so.

It is unbelievable for me how unstable this software is.

When i canā€™t fix all of these errors i have no more product for my costumers :frowning: