Commit d12a905c authored by tbrehm's avatar tbrehm

Fixed: FS#1701 - Backup symlink folder permissions wrong - pre 3.0.3.3

parent 763507d9
...@@ -13,6 +13,7 @@ hostname=server1.domain.tld ...@@ -13,6 +13,7 @@ hostname=server1.domain.tld
nameservers=192.168.0.1,192.168.0.2 nameservers=192.168.0.1,192.168.0.2
loglevel=2 loglevel=2
backup_dir=/var/backup backup_dir=/var/backup
backup_dir_ftpread=y
[mail] [mail]
module=postfix_mysql module=postfix_mysql
......
...@@ -138,6 +138,12 @@ $form["tabs"]['server'] = array( ...@@ -138,6 +138,12 @@ $form["tabs"]['server'] = array(
'width' => '40', 'width' => '40',
'maxlength' => '255' 'maxlength' => '255'
), ),
'backup_dir_ftpread' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
################################## ##################################
# ENDE Datatable fields # ENDE Datatable fields
################################## ##################################
......
...@@ -86,4 +86,5 @@ $wb["network_config_warning_txt"] = 'The network configuration option is only av ...@@ -86,4 +86,5 @@ $wb["network_config_warning_txt"] = 'The network configuration option is only av
$wb["CA_path_txt"] = 'CA Path'; $wb["CA_path_txt"] = 'CA Path';
$wb["CA_pass_txt"] = 'CA passphrase'; $wb["CA_pass_txt"] = 'CA passphrase';
$wb["fastcgi_config_syntax_txt"] = 'FastCGI config syntax'; $wb["fastcgi_config_syntax_txt"] = 'FastCGI config syntax';
$wb["backup_dir_ftpread_txt"] = 'Backup dir. readable for website FTP users.';
?> ?>
\ No newline at end of file
...@@ -42,6 +42,12 @@ ...@@ -42,6 +42,12 @@
<label for="backup_dir">{tmpl_var name='backup_dir_txt'}</label> <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" /> <input name="backup_dir" id="backup_dir" value="{tmpl_var name='backup_dir'}" size="40" maxlength="255" type="text" class="textInput" />
</div> </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> </fieldset>
<input type="hidden" name="id" value="{tmpl_var name='id'}"> <input type="hidden" name="id" value="{tmpl_var name='id'}">
......
...@@ -435,8 +435,16 @@ $backup_dir = $server_config['backup_dir']; ...@@ -435,8 +435,16 @@ $backup_dir = $server_config['backup_dir'];
if($backup_dir != '') { 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)) { 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'"; $sql = "SELECT * FROM web_domain WHERE type = 'vhost'";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment