Article ID: 114801, created on Sep 20, 2012, last review on May 11, 2014

  • Applies to:
  • Plesk 11.x for Linux
  • Plesk 10.x for Linux

Symptoms

After transferring my domains to a new Parallels Plesk Panel (PP) server all apache vhosts which use mod_php do not have "open_basedir" restriction set.

Cause

Due to a file system inconsistency or an error "open_basedir" restriction may not get through to configuration files of some vhosts.

Resolution

This may be a security issue and it is better to minimize the risk of such possibility. You may use this command to get the list of domains without open_basedir restriction:

grep open_basedir  /var/www/vhosts/*/conf/last_httpd.include | awk -F/ '{print $5}' | uniq | sort > basedir.txt;  grep open_basedir  /home/httpd/vhosts/*/conf/last_httpd_ip_default.include  | awk -F/ '{print $5}' | uniq | sort >> basedir.txt; sort basedir.txt > basedir.txt1 | ls -1 /var/www/vhosts| egrep -v '*\.txt|default|chroot|fs-passwd' | sort > all.txt;  diff basedir.txt1 all.txt

If you are using PP 10.x you need to replace the last_httpd.include and last_httpd_ip_default.include with actual filenames.
Regardless of the PP version replace /var/www/vhosts with the actual path to virtual hosts if it differs in your case.

In the output you can get suspended domains and domains without PHP support, use this command to verify that:

/usr/local/psa/bin/domain -i domain.tld | egrep 'Domain status|PHP support:'


Example of usage (for PP 10.x):

We do not have any *ip_default.include files, so we just do not replace that placeholder.

# grep open_basedir  /var/www/vhosts/*/conf/13402644200.56079000_httpd.include | awk -F/ '{print $5}' | uniq | sort > basedir.txt;  grep open_basedir  /home/httpd/vhosts/*/conf/last_httpd_ip_default.include  | awk -F/ '{print $5}' | uniq | sort >> basedir.txt; sort basedir.txt > basedir.txt1 | ls -1 /var/www/vhosts| egrep -v '*\.txt|default|chroot|fs-passwd' | sort > all.txt;  diff basedir.txt1 all.txt
grep: /home/httpd/vhosts/*/conf/last_httpd_ip_default.include: No such file or directory
0a1
> example.com
#
# /usr/local/psa/bin/domain -i example.com | egrep 'Domain status|PHP support:'
Domain status:                          OK
PHP support:                            Off
PHP support:                            0
#

The server in the above example is secure, because the only domain which has no open_basedir restriction does not have PHP enabled either.

dd0611b6086474193d9bf78e2b293040 56797cefb1efc9130f7c48a7d1db0f0c a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 0a53c5a9ca65a74d37ef5c5eaeb55d7f

Email subscription for changes to this article
Save as PDF