How to delete directories outside /web or /private dirs?

Discussion in 'ISPConfig 3 Priority Support' started by radim_h, Mar 13, 2014.

  1. radim_h

    radim_h Member HowtoForge Supporter


    i have lot of directories in root of /var/www/clients/clienxxx outside directories /web and /private where users can write ..
    Those was created before fix in ISPC which allowed write only to above directories

    I'm not able delete those outside directories even as user root - getting message
    rmdir: failed to remove `DIRNAME/': Permission denied

    how could i delete those dirs?

    Regards RH
  2. srijan

    srijan New Member HowtoForge Supporter


    For this I will follow like this.Change the permissions fo the directory as

    then simply
    where dir_name is your directory name.

  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The directory is protected with the immutable attribute, so you can not remove any directories before you switch the immutabe attribute of.

    Remove immutable bit:

    chattr -i /var/www/clients/clienX/webX

    then delete the directories, afterwards, switch the immutable bit on again:

    chattr +i /var/www/clients/clienX/webX
  4. radim_h

    radim_h Member HowtoForge Supporter

    Thank you Till, it works

Share This Page