Skip to content

Commit 6f4e390

Browse files
committed
Check the ispconfig_log_dir instead of the file to be writable.
1 parent b31ac61 commit 6f4e390

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

install/install.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@
154154
swriteln($inst->lng(' Tap in "quit" (without the quotes) to stop the installer.'."\n\n"));
155155

156156
//** Check log file is writable (probably not root or sudo)
157-
define('ISPC_LOG_FILE', $conf['ispconfig_log_dir'] . '/install.log');
158-
if(!is_writable(dirname(ISPC_LOG_FILE))){
159-
die("ERROR: Cannot write to the ".dirname(ISPC_LOG_FILE)." directory. Are you root or sudo ?\n\n");
157+
if(!is_writable(dirname($conf['ispconfig_log_dir']))){
158+
die("ERROR: Cannot write to the ".$conf['ispconfig_log_dir']." directory. Are you root or sudo ?\n\n");
160159
}
161160

162161
if(!is_dir($conf['ispconfig_log_dir'])) {
163162
mkdir($conf['ispconfig_log_dir'], 0755, true);
164163
}
164+
define('ISPC_LOG_FILE', $conf['ispconfig_log_dir'] . '/install.log');
165165

166166
//** Check for ISPConfig 2.x versions
167167
if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) {

0 commit comments

Comments
 (0)