GoAdmio
GoAdmio Documentation

Open Basedir Settings

From the GoAdmio knowledge base.

Open Basedir Settings

This page explains the Open Basedir Settings feature in GoAdmio. It controls PHP's open_basedir directive — the list of directories PHP is allowed to access — for a domain account.

Location: Admin Panel → Security → Open Basedir Settings
Location (User Panel): Security → Open Basedir Settings (if enabled for the account)



Overview

PHP's open_basedir directive restricts which directories PHP scripts can read, write, and execute files in. When set, PHP can only access files inside the listed directories — any attempt to access a file outside them is blocked with a warning.

This is a defense-in-depth measure. It limits the damage a compromised or malicious script can do by confining it to a specific directory tree — usually the account's home directory.

> Warning: Changing open_basedir is dangerous. An incorrect setting can:
> - Break legitimate websites that access files outside the expected path (e.g., shared libraries, uploads directories, temporary files)
> - Silently break features that rely on include/require from paths outside the configured tree
> - Cause hard-to-diagnose errors
>
> For shared hosting providers: keep the default settings for every domain account. The default is designed to be safe and functional for standard hosting. Only adjust it if you fully understand the consequences.



How It Works

When open_basedir is set, PHP checks every file operation against the list of allowed directories:

| Operation | Checked against open_basedir |
|---|---|
| fopen, file_get_contents | ✅ Yes |
| include, require | ✅ Yes |
| unlink, rename, copy | ✅ Yes |
| mkdir, rmdir | ✅ Yes |
| opendir, scandir | ✅ Yes |
| MySQL connections | ❌ No — only filesystem |
| exec, shell_exec | ❌ Not restricted by open_basedir (but the function may be disabled — see PHP Disable Functions) |

If a script tries to access a path outside the allowed directories, PHP emits a warning and refuses the operation:

↑