Fixed: FS#1701 - Backup symlink folder permissions wrong - pre 3.0.3.3
| | |
| | | nameservers=192.168.0.1,192.168.0.2 |
| | | loglevel=2 |
| | | backup_dir=/var/backup |
| | | backup_dir_ftpread=y |
| | | |
| | | [mail] |
| | | module=postfix_mysql |
| | |
| | | 'width' => '40', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'backup_dir_ftpread' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | | ################################## |
| | |
| | | $wb["CA_path_txt"] = 'CA Path'; |
| | | $wb["CA_pass_txt"] = 'CA passphrase'; |
| | | $wb["fastcgi_config_syntax_txt"] = 'FastCGI config syntax'; |
| | | $wb["backup_dir_ftpread_txt"] = 'Backup dir. readable for website FTP users.'; |
| | | ?> |
| | |
| | | <label for="backup_dir">{tmpl_var name='backup_dir_txt'}</label> |
| | | <input name="backup_dir" id="backup_dir" value="{tmpl_var name='backup_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='backup_dir_ftpread_txt'}</p> |
| | | <div class="multiField"> |
| | | {tmpl_var name='backup_dir_ftpread'} |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | |
| | | |
| | | if($backup_dir != '') { |
| | | |
| | | if(isset($server_config['backup_dir_ftpread']) && $server_config['backup_dir_ftpread'] == 'y') { |
| | | $backup_dir_permissions = 0755; |
| | | } else { |
| | | $backup_dir_permissions = 0750; |
| | | } |
| | | |
| | | if(!is_dir($backup_dir)) { |
| | | mkdir(escapeshellcmd($backup_dir), 0750, true); |
| | | mkdir(escapeshellcmd($backup_dir), $backup_dir_permissions, true); |
| | | } else { |
| | | chmod(escapeshellcmd($backup_dir), $backup_dir_permissions); |
| | | } |
| | | |
| | | $sql = "SELECT * FROM web_domain WHERE type = 'vhost'"; |