What is and because the error "open_basedir restriction in effect appears. File is not within the allowed paths"

What it is and because it appears "open_basedir restriction in effect. File is not within the allowed paths"

When you program in PHP on a web server, you usually make multiple includes or requires to other files on your website. This may be because you need a class or certain functions that, for convenience and code clarity, are located in a different path from the file/plugin you are editing.
 
The open_basedir configuration is mainly used to prevent PHP scripts of a particular user from accessing files belonging to another user's account. 
 
Some plugin files or imported website files attempt to include or require other files that are located outside the web folder of our project, that is, in directories that are at lower levels than the root folder of our website.
 
It is possible that at some point, when trying to modify a file or a plugin, the system denied you access—even though you had the necessary permissions—with the following message:
 
open_basedir restriction in effect. File(../ruta/archivo.php) is not within the allowed path(s)
 
This indicates that the PHP directive open_basedir is preventing access to the location where the file is stored. As mentioned, open_basedir is a directive that defines the limit of the files PHP can access according to the specified path. Therefore, if the file you want to use is outside that path, the system will display this error. 
 
For security reasons, the open_basedir directive is enabled and cannot be disabled on cdmon hosting accounts.
 
If you correctly define the path of your files, any file within your own account should be readable by your own scripts. 
 
The root directory of hosting accounts on cdmon servers is /usr/home/nombredelhosting.com 
 
If you have any questions, you can contact our customer support service.
    • Related Articles

    • How to set up the robots.txt file

      Robots are machines belonging to search entities on the Internet, such as Google, Yahoo or Bing. These robots access web pages to search for information within it and add this information in search engines, which we usually know as indexing or ...
    • Information and uses of the .htaccess file

      1.- What is a .htaccess? The .htaccess (hypertext access) file is the default name for Apache’s directory-level configuration file. It is used to customize the configuration of directives and parameters defined in the main hosting configuration file. ...
    • WordPress: Theme/plugins file editor does not appear

      If you have WordPress installed on your website, you may at some point need to make direct adjustments to your theme or plugin files. However, you might find that the option to edit these files directly from the WordPress administration panel is not ...
    • How to change file and directories from webFTP and from Filezilla

      When we create a new file or make changes to the hosting, it is possible that the permissions of these files are not correct and therefore we cannot perform the necessary actions. Below we will explain how to change file and directory permissions ...
    • How to change the IP to which the domain points locally (configure hosts file)

      In certain situations we want to view the content of a hosting different from the one the domain points to. For example, when performing a migration from another provider to cdmon while the domain is still pointing to them, but we want to check ...