ISPConfig Web Directories

Discussion in 'General' started by rwheindl, Sep 25, 2017.

  1. rwheindl

    rwheindl New Member

    Perhaps this is more of a general linux question, but since ISPConfig introduced me to this, I'm asking here...
    When I'm working with the web directories, a few years back I discovered they have the "immutable" attribute set via "chattr +i/-i" and I have a couple questions about this attribute.
    1) Is it only on the web folder? (I think so.)
    2) How does the attribute relate to files inside the folder?
    3) It appears when I rsync the directories (for backup purposes) rsync can access and retain all the proper attributes, but if I use the cp command or try to tar the directory without running "chattr -i" first, my archives get corrupted. I can successfully compress it into a .tgz file without errors during creation, but when I later try to unzip, the file is corrupt. At which point I go back, run "chattr -i", then it works. Why is that? Why doesn't the tar command throw errors right away?
    4) If tar can't properly access the contained data, how is it that pureftpd accounts can successfully get in that directory and make changes?
    Thanks for the insights!
  2. rwheindl

    rwheindl New Member

    Additionally, I'm usually on the system as root when I need to cp folders or tar them into a compressed file. PureFTPd uses the configured control panel accounts for access, but I can't figure out the strange behavior.
  3. HSorgYves

    HSorgYves Active Member

    ISPConfig doesn't set +i on the web folder (webxx/web), it sets it on the home folder of the website (webxx). This is done to prevent changes inside that folder by everyone including root. So if you backup the web folder (webxx/web) you backup a folder which does not have the +i, so there should be no trouble.
    Besides lsattr lists the +I flag for the temp folder (webxx/web/tmp) when it is used by apache as it is being indexed using hashed trees. This flag cannot be set or cleared though.

Share This Page