root can't write in /var/www/virtual/example.com

  • I'm using i-MSCP 1.3.1 on Debian Jessie. After logging in via ssh (I don't use the InstantSSH-plugin, it's my own system account) and switching to the root user, I can't write to user directories such as /var/www/virtual/example.com and below. How is this made, why and how can I disable it? I need to migrate a lot of users to the server and it's complicated not work as root…


    Thanks in advance!

  • @Cheatha


    This is expected. Customer Web folders are protected using immutable bit to prevent them to delete or write in some directories.
    This feature is called Web folder protection. You can deactivate it either through the control panel interface by editing each customer main domain properties, or manually through SSH:


    For instance, if you want remove the immutable bit on any of your customer Web folders (recursively):

    Code
    1. chattr -R -i /var/www/virtual

    In action

    Be aware that the customer Web folders will be protected again when you'll rerun the i-MSCP installer or reconfiguration script unless you disable that feature (not recommended) for each customer through the control panel.



    See also the following man pages:

    • chattr(1)
    • lsattr(1)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206