ISPConfig: Add additional folder in home directory of a virtual host

image_print

The home directory of a site is /var/www/clients/client1/web1 for the first site of client 1. It has set the immutable bit which prevents adding or deleting a file or folder within here. To add a custom folder, the immutable bit has to be unset first which is only possible as root user.

In this example, we want to create the additional folder .cache within the home directory.

chattr -i /var/www/clients/client1/web1
mkdir /var/www/clients/client1/web1/.cache
chown web1:client1 /var/www/clients/client1/web1/.cache
chattr +i /var/www/clients/client1/web1

If PHP needs to write to the new folder, add the path to PHP open_basedir.