From 65ee3af0845f20cd3ae4a3d0c2ee3ce865f7fc7c Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Mon, 27 Jun 2016 11:52:02 -0400 Subject: [PATCH] Change file mode of backups that are made available for download to 0600. --- server/plugins-available/cron_plugin.inc.php | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php index f638166..b54e971 100644 --- a/server/plugins-available/cron_plugin.inc.php +++ b/server/plugins-available/cron_plugin.inc.php @@ -136,11 +136,11 @@ } // get the primitive folder for document_root and the filesystem, will need it later. - $df_output=exec("df -T $document_root|awk 'END{print \$2,\$NF}'"); - $file_system = explode(" ", $df_output)[0]; - $primitive_root = explode(" ", $df_output)[1]; + $df_output=explode(" ", exec("df -T $document_root|awk 'END{print \$2,\$NF}'")); + $file_system = $df_output[0]; + $primitive_root = $df_output[1]; - if ( $file_system , array('ext2','ext3','ext4') ) { + if ( in_array($file_system , array('ext2','ext3','ext4'),true) ) { exec('setquota -u '. $username . ' ' . $blocks_soft . ' ' . $blocks_hard . ' 0 0 -a &> /dev/null'); exec('setquota -T -u '.$username.' 604800 604800 -a &> /dev/null'); } elseif ($file_system == 'xfs') { -- Gitblit v1.9.1