Follow us on Twitter

What is PHP's open_basedir restriction?

We have a security measure in place in PHP on all servers called "open_basedir". This is where PHP scripts are restricted with regard to what parts of the server filesystem they can access.

We maintain a list of areas where PHP scripts are allowed to access (/home/username, /tmp + others) and if a script attempts to access a file or directory elsewhere on the filesystem it will result in an error relating to "open_basedir". This stops PHP scripts accessing directories and files owned by other users, specific to the server config and root user, etc.

It is rare that the allowed paths list will need modification for any user. However, sometimes an alteration is required for some scripts to function properly (eg ModernBill). If you think this applies to you, please contact our support team remembering to include the full error message and domain name and we'll investigate.


Was this answer helpful?

Related Articles

Using scripts in your account that are insecure (vulnerabilities unpatched) is very dangerous. Doing so runs the risk of account suspension or...
NetPBM is not installed in a central location on the server because ImageMagick can usually be used instead in most scripts and is installed on all...
Yes, for a number of reasons certain scripts and types of script are banned. It's extremely important that clients check our terms of service to...
The path to Python on our servers is: /usr/bin/python
Imagemagick is a popular utility for manipulation of image files within scripts and is often used by image galleries. The ImageMagick files are...