need your help on realpath issue on plesk

Hello Team we are using the nextcloud on the plesk linux server and we are getting the error , which we need your help to fix it # plesk -v Product version: Plesk Obsidian 18.0.68.2 OS version: CentOS 7.9.2009 x86_64 when we set the ‘datadirectory’ => realpath(dir . ‘/../../nextcloud-data’), path to this its working both frontend and php -d memory_limit=2048M occ when we set the ‘datadirectory’ => ‘/home/httpd/vhosts/baumediation-sdm.ch/docu.baumediation-sdm.ch/nextcloud-data’, path to this , only frontend is working but not the php -d memory_limit=2048M occ command Actual message : In the NextCloud config.php file, Nextcloud writes the following as the default for the data directory: ‘datadirectory’ => ‘/home/httpd/vhosts/baumediation-sdm.ch/docu.baumediation-sdm.ch/nextcloud-data’,but the path /home/httpd/vhosts/baumediation-sdm.ch/… is not accessible for occ or the shell. is not accessible only for the web application. As a result, occ cannot find the data directory for the various maintenance tasks and updates (no access). Temporarily, we can write the following statement in the config.php file: ‘datadirectory’ => realpath(dir . ‘/../../nextcloud-data’), This allows both the execution of occ on the cli/shell and the web application to work. However, NextCloud overwrites the listed path with the absolute path each time it is changed or maintained. Please help us how to fix this ?

Not sure if it changes, when you put the config file as read-only:

Not sure if that prevents the file being overwritten or if you have to put the file as well as read-only.

So the bottom line sounds like your shell/occ is executed under a different user than your web server? Is that accurate?

Can you use su/sudo to run occ under the correct user? This is how it should be run per the Admin Manual anyhow. See Running occ.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.