backup - delete unused file (interval = none)
It seems as if the daily cron got some problems. If you configure ispconfig to create backups owned by root, the directory structure looks like:
root@srv1 /usr/local/ispconfig/server # ls -lha /var/backup drwxr-x--- 2 web1 client1 4,0K Mai 16 14:56 web1 root@srv1 /usr/local/ispconfig/server # ls -lha /var/backup/web1/ -rwxr-x--- 1 root root 44K Mai 16 14:56 web1_2015-05-16_14-56.tar.gz
Alright, but now you choose your backup interval to none, so the daily_cron will try to delete theese files:
exec('sudo -u '.escapeshellarg(web_user).' rm -f '.escapeshellarg(
web_backup_dir.'/'));
--> sudo -u web1 rm -f '/var/backup/web1/'
The problem will be first, that /var/backup is owned by root:root by 750 (no access by web1)... If you fix the permissions (755), next time it will be reset:
if(isset($server_config['backup_dir_ftpread']) && $server_config['backup_dir_ftpread'] == 'y') {
$backup_dir_permissions = 0755;
} else {
$backup_dir_permissions = 0750;
}
So we need to differentiate 2 cases:
if only accessable by root , sudo should be not used, if by user, sudo -u usage.
Another solution is to set 755 without 2 cases, but I think it would be better to use sudo as prefix , if user access is configured.