Open_basedir error after moving site

Hi Support
I have a site i have just moved to a new server

It seems to work fine but when i try the admin panel using this link: https://docs.smartcollection.co.uk/admin
I get open_bsedir error

The way i have moved it is to download the zip new install files
Then i have taken the “user” folder from by existing server and copied it over to the new server (renaming the existing user folder to userORG

I have tried to copy folder by folder in the user and checking every time but than i get even more errors. The open_basedir looks correct and the URL is included so i am a little lost.
Any idea where to look for the error.
I am using PHP 7.4
I also attach here the error log entery when error is showing.
Any help would be appreciated
Thanks. Morten

[2022-12-16 02:51:37] grav.CRITICAL: SplFileInfo::isFile(): open_basedir restriction in effect. File(/var/www/clients/client9/web60/webuser/plugins/customadmin/customadmin.css) is not within the allowed path(s): (/var/www/clients/client9/web60/web:/var/www/clients/client9/web60/private:/var/www/clients/client9/web60/tmp:/var/www/docs.smartcollection.co.uk/web:/srv/www/docs.smartcollection.co.uk/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom:/var/www/clients/client9/web60/webuser/plugins:/var/www/clients/client9/web60/web/user/plugins/customadmin:/var/www/clients/client9/web60/webuser/plugins/customadmin/) - Trace: #0 /var/www/clients/client9/web60/web/system/src/Grav/Common/Assets/BaseAsset.php(146): SplFileInfo->isFile() #1 /var/www/clients/client9/web60/web/system/src/Grav/Common/Assets.php(288): Grav\Common\Assets\BaseAsset->init() #2 /var/www/clients/client9/web60/web/system/src/Grav/Common/Assets.php(312): Grav\Common\Assets->addType() #3 /var/www/clients/client9/web60/web/user/plugins/customadmin/customadmin.php(32): Grav\Common\Assets->addCss() #4 /var/www/clients/client9/web60/web/vendor/symfony/event-dispatcher/EventDispatcher.php(264): Grav\Plugin\CustomadminPlugin->onPageInitialized() #5 /var/www/clients/client9/web60/web/vendor/symfony/event-dispatcher/EventDispatcher.php(239): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() #6 /var/www/clients/client9/web60/web/vendor/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners() #7 /var/www/clients/client9/web60/web/system/src/Grav/Common/Grav.php(597): Symfony\Component\EventDispatcher\EventDispatcher->dispatch() #8 /var/www/clients/client9/web60/web/system/src/Grav/Common/Processors/PagesProcessor.php(59): Grav\Common\Grav->fireEvent() #9 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\PagesProcessor->process() #10 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #11 /var/www/clients/client9/web60/web/system/src/Grav/Common/Processors/TwigProcessor.php(38): Grav\Framework\RequestHandler\RequestHandler->handle() #12 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\TwigProcessor->process() #13 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #14 /var/www/clients/client9/web60/web/system/src/Grav/Common/Processors/AssetsProcessor.php(39): Grav\Framework\RequestHandler\RequestHandler->handle() #15 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\AssetsProcessor->process() #16 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #17 /var/www/clients/client9/web60/web/system/src/Grav/Common/Processors/SchedulerProcessor.php(40): Grav\Framework\RequestHandler\RequestHandler->handle() #18 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\SchedulerProcessor->process() #19 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #20 /var/www/clients/client9/web60/web/system/src/Grav/Common/Processors/BackupsProcessor.php(39): Grav\Framework\RequestHandler\RequestHandler->handle() #21 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\BackupsProcessor->process() #22 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #23 /var/www/clients/client9/web60/web/system/src/Grav/Common/Processors/TasksProcessor.php(69): Grav\Framework\RequestHandler\RequestHandler->handle() #24 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\TasksProcessor->process() #25 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #26 /var/www/clients/client9/web60/web/system/src/Grav/Common/Processors/RequestProcessor.php(64): Grav\Framework\RequestHandler\RequestHandler->handle() #27 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\RequestProcessor->process() #28 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #29 /var/www/clients/client9/web60/web/system/src/Grav/Common/Processors/ThemesProcessor.php(38): Grav\Framework\RequestHandler\RequestHandler->handle() #30 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\ThemesProcessor->process() #31 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #32 /var/www/clients/client9/web60/web/system/src/Grav/Common/Processors/PluginsProcessor.php(39): Grav\Framework\RequestHandler\RequestHandler->handle() #33 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\PluginsProcessor->process() #34 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #35 /var/www/clients/client9/web60/web/system/src/Grav/Common/Processors/InitializeProcessor.php(130): Grav\Framework\RequestHandler\RequestHandler->handle() #36 /var/www/clients/client9/web60/web/system/src/Grav/Common/Debugger.php(546): Grav\Common\Processors\InitializeProcessor::Grav\Common\Processors{closure}() #37 /var/www/clients/client9/web60/web/system/src/Grav/Common/Processors/InitializeProcessor.php(131): Grav\Common\Debugger->profile() #38 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\InitializeProcessor->process() #39 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #40 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php(40): Grav\Framework\RequestHandler\RequestHandler->handle() #41 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Framework\RequestHandler\Middlewares\MultipartRequestSupport->process() #42 /var/www/clients/client9/web60/web/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle() #43 /var/www/clients/client9/web60/web/system/src/Grav/Common/Grav.php(312): Grav\Framework\RequestHandler\RequestHandler->handle() #44 /var/www/clients/client9/web60/web/index.php(47): Grav\Common\Grav->process() #45 {main}

@morten, It is probably caused by the, 7 years old and never updated since, plugin CustomAdmin. Also, the plugin is no longer maintained.

The plugin injects js/css files into Admin with which Admin can be tweaked.

The error complains about url /var/www/clients/client9/web60/webuser/plugins/customadmin/customadmin.css.

The plugin adds ‘user/plugins/customadmin/customadmin.css’ see code line #32.

It seems there is a forward slash missing in /webuser/, which should probably be /web/user/.

You could try one of the following suggestions:

  • Ditch the plugin.
    • It is old and abandoned.
    • Does it (still) serve any valuable purpose?
  • Add a leading slash in code line #32

Why it did work before on the other server? I have no idea…

Hi
Thanks alot for your time and reply.
Question 1: I tried to download the basic GRAV without the customadmin but then
https://docs.smartcollection.co.uk/admin
did not work. So this /admin is that the customadmin plugin?
If yes so without this the only way to update is via FTP, create folders end code edit files.
Is this correct or is this “customadmin” plugin something else?
I really liked the iterface when logging in in the browser and add pages from the admin panel

Question 2: If i move my “user” folder over after installing a plain GRAV CMS, i see that in my userfolder i do have the plugin “customadmin”. Should i just delete that folder within the plugin to “unistal” the plugin?

Thanks again for your time
Regards
Morten

Hi Again
I got it resolved
As you said I added a leading slash in the customadmin.php and that sorted it.
Thanks for all your help!!
Regards
Morten

@morten,

I tried to download the basic GRAV without the customadmin but then
Grav Admin Login | Documentation
did not work.

“Did not work” is not very informative… The Admin plugin works fine by itself.

Use a clean install of Grav and notice Admin is just running fine. CustomAdmin is not needed for Admin to work properly.

Plugin CustomAdmin should only be used if one really knows what one is doing when injecting css/js into the Admin page to alter its layout and/or add functionality.

So this /admin is that the customadmin plugin?

No absolutely not. Url https://domain/admin is the official Admin panel. It resides in folder /user/plugins/admin.

Should i just delete that folder within the plugin to “unistal” the plugin?

To remove a plugin,

  • one can savely remove its folder using $ rm -rf user/plugins/pluginname,
  • or use the Delete button in the config page of the plugin in Admin (given that Admin is running).

As you said I added a leading slash in the customadmin.php and that sorted it.

I would suggest you:

  • Check if files /user/plugins/customadmin/customadmin.css and /user/plugins/customadmin/customadmin.js do indeed contain css resp. js code.
  • If so, backup the plugins folder and delete the plugin to see if anything has changed in Admin.
    • If not delete folder /user/plugins/customadmin

Hi again
Thank you for following up on this!
Yes i got it to work by adding the / infront of the “user” in the customadmin.php line 32
Also thanks for explaining about the custom-admin plugin and I now understand its not needed.
Also info on delete the plugin

Thanks for super support
Kind Regards
Morten