Skip to content

Commit 99c89bf

Browse files
author
maddinxx
committed
better security for auth.log file
1 parent 5712a61 commit 99c89bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

install/lib/installer_base.lib.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,9 +1957,11 @@ public function install_ispconfig() {
19571957
touch($conf['ispconfig_log_dir'].'/ispconfig.log');
19581958
}
19591959

1960-
//* Create the ispconfig auth log file
1960+
//* Create the ispconfig auth log file and set uid/gid
19611961
if(!is_file($conf['ispconfig_log_dir'].'/auth.log')) {
1962-
touch($conf['ispconfig_log_dir'].'/auth.log', 0666);
1962+
touch($conf['ispconfig_log_dir'].'/auth.log');
1963+
exec('chown ispconfig:ispconfig '. $conf['ispconfig_log_dir'].'/auth.log');
1964+
exec('chmod 660 '. $conf['ispconfig_log_dir'].'/auth.log');
19631965
}
19641966

19651967
if(is_user('getmail')) {

0 commit comments

Comments
 (0)