ISPConfig how to rename web directory

ISPConfig is a free hosting control panel. The DocumentRoot in ISPConfig is /var/www/clients/client0/web1/web. In the path client0 and web1 changes depending on number of customers and web site you have on the server. If you try to rename web foder, you get permission denied error, this is because ISPConfig set chattr +i (immune) to parent folder of document root so users can change it. This is to avoid a user delete DocumentRoot folder.

root@server:/var/www/clients/client0/web1# mv web web-old
mv: cannot move 'web' to 'web-old': Operation not permitted
root@server:/var/www/clients/client0/web1# 

If you need to rename or delete the folder, you can run

chattr -i /var/www/clients/client0/web1

To protect the folder again, run

chattr +i /var/www/clients/client0/web1

See ISPConfig

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *