No .htaccess in automatic backup?

Discussion in 'Installation/Configuration' started by tron, Mar 22, 2006.

  1. tron

    tron New Member

    I've noticed that the automatic backup functionality doesn't backup .htaccess files. The man page of zip explains that I need to add ".* *" instead of just "*" as a parameter to include them. EDIT: them = files starting with a dot

    Looking at /root/ispconfig/scripts/shell/backup.php tells me that you are using just the "*" so I thought that changing it to the above would be the way to go. But then I looked at the and saw files starting with a dot in that zip such as .antivirus.rc. On the other hand the file .no_delete is not included. Now I am confused.

    Why is .antivirus.rc included but .htaccess isn't?

    I assume you either forgot about .htaccess or there is a good reason to not include .htaccess in the backup. What reason would that be?

    If I want to include .htaccess in the backup, changing
    would do the trick, wouldn't it? Running "zip .* *" works for me.

    Thank you very much.
    Last edited: Mar 22, 2006
  2. falko

    falko Super Moderator Howtoforge Staff

    I guess this has something to do with permissions: .no_delete is owned by root and has 400 permissions. It must be similar with the other files that are not included in the zip file.
  3. tron

    tron New Member

    First of all, I need to revise my statement from above. .htaccess files are included in the backup except /var/www/webN/web/.htaccess. Sorry for that.

    I just verifed your point with my setup:

    All .no_delete files are owned by root and have 400 permissions
    All .antivirus.rc files etc. except .vacation.cache are owned by root and have 644 permissions
    All /var/www/webN/web/.htaccess files are owned by root and have 644 permissions

    I've got one .htaccess two directory levels further down with the same permissions and this one is included in the backup as well. The one from /var/www/webN/web/stats/ is owned by the respective user and has 664 permissions. They are also included in the backup.

    So, permissions shouldn't be the problem, should they?

    Anyway, I have now changed the appropriate line in the backup script to
    This seems to work whereas
    gave me all sorts of errors when unzipping the zip file.
  4. falko

    falko Super Moderator Howtoforge Staff

    Files with 644 permissions should always be included, as everybody has read permissions. Files with 400 are only included if the backup is run as the file owner.

Share This Page