Ownership of website backups

Discussion in 'Developers' Forum' started by lucani, Nov 17, 2010.

  1. lucani

    lucani New Member

    Hello,

    I activated website backup module and after first backup I found out that I can't get access to backups through "backup" symlink in FTP connection. It was because owner of this folder is root. I also checked part of code in /usr/local/ispconfig/server/cron_daily.php responsible for it.

    PHP:
    $web_path $rec['document_root'];
    $web_user $rec['system_user'];
    $web_group $rec['system_group'];
    $web_id $rec['domain_id'];
    $web_backup_dir $backup_dir.'/web'.$web_id;
    if(!
    is_dir($web_backup_dir)) mkdir($web_backup_dir0750);
    [
    B]chmod($web_backup_dir0755);
    chown($web_backup_dir'root');
    chgrp($web_backup_dir'root');[/B]
    Shouldn't it be:
    PHP:
    chmod($web_backup_dir0755);
    chown($web_backup_dir$rec['system_user']);
    chgrp($web_backup_dir$rec['system_group']);
    ?

    In this way user can download through FTP zip with backup of his website. If not why does script create symlink in website folder?

    Moreover I want ask if it's possible to change type of backup frequency in next version of ISPConfig? I think the better way is to use separately:
    - number of backups in day AND week AND month ("and" not "or")
    - number of backups to carry in backup folder

    For example in AutoMySQLBackup script it's possible to create 2 backups per day and carry last 5 of this type in daily folder. Moreover 3 backups per week and carry last 10 in weekly folder. And finally 1 backup per month and carry last 6 in monthly folder. I know it's stupid example but I want only show you how flexible is this type of frequency. It's not so hard to implement but it require additional field.
     

Share This Page