HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   Ownership of website backups (http://www.howtoforge.com/forums/showthread.php?t=50079)

lucani 17th November 2010 18:10

Ownership of website backups
 
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 Code:

$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 Code:

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.


All times are GMT +2. The time now is 08:02.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.