• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

vhost.conf ignored when script run through ssh rather than browser?

R

rene verheij

Guest
Hi,

Just set up open_basedir through vhost.conf to allow the whole domain to have access to /usr/local/share/something/, /var/www/vhosts/domain.com/httpdocs/ and /tmp.

When I run my script www.domain.com/file.php through the browser it gets access to /usr/local/share/something/, just like I want it too.

But now I need to run something through SSH:
/usr/bin/php -q /var/www/vhosts/domain.com/httpdocs/some_folder/file.php

which gives an error telling me about a open_basedir restriction. In other words, if running a script through SSH the open_basedir settings of vhost.conf seem to have no effect.

When the script tries to access ../some_other_folder/ it gives an open_basedir restriction error "... some_other_folder is not within the allowed path(s): (/tmp)" ... which is the global open_basedir setting.

Any advice?

Tnx in advance!
 
Right, vhost.conf settings are actual only for access via webserver (apache) and haven't any effect when you run php via CLI. All actual settings for php command are stored in /etc/php.ini file
 
Ok, that makes sense then. Tnx!

And do you know if the cronjobs for a specific domain that I add in plesk would use the vhost.conf file?
 
And do you know if the cronjobs for a specific domain that I add in plesk would use the vhost.conf file?

Once again - vhost.conf is just Apache config file and it is actual only for Apache operation. I don't know how this config file can be used for cronjob tasks. It can be modified somehow by cronjob task for changing webhosting domain's parameters (Apache settings), but can't be used as parameter for some cronjob tasks. Maybe it can be used but I can't imagine how :)
 
Back
Top