Skip to content

Commit 710f357

Browse files
committed
Updated the installer to change permissions on the language file directories.
1 parent b7afdec commit 710f357

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

install/lib/installer_base.lib.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@ public function install_ispconfig()
604604
$content = str_replace('{server_id}', $this->conf['server_id'], $content);
605605
wf("$install_dir/server/lib/$configfile", $content);
606606

607+
607608
//* Enable the server modules and plugins.
608609
// TODO: Implement a selector which modules and plugins shall be enabled.
609610
$dir = $install_dir.'/server/mods-available/';
@@ -638,6 +639,25 @@ public function install_ispconfig()
638639
$command = "chown -R ispconfig:ispconfig $install_dir";
639640
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
640641

642+
//* Make the global language file directory group writable
643+
exec("chmod -R 660 $install_dir/interface/lib/lang");
644+
645+
//* Make all interface language file directories group writable
646+
$handle = @opendir($install_dir.'/interface/web');
647+
while ($file = @readdir ($handle)) {
648+
if ($file != '.' && $file != '..') {
649+
if(@is_dir($install_dir.'/interface/web'.'/'.$file.'/lib/lang')) {
650+
$handle2 = opendir($install_dir.'/interface/web'.'/'.$file.'/lib/lang');
651+
chmod($install_dir.'/interface/web'.'/'.$file.'/lib/lang',0660);
652+
while ($lang_file = @readdir ($handle2)) {
653+
if ($lang_file != '.' && $lang_file != '..') {
654+
chmod($install_dir.'/interface/web'.'/'.$file.'/lib/lang/'.$lang_file,0660);
655+
}
656+
}
657+
}
658+
}
659+
}
660+
641661
//* make sure that the server config file (not the interface one) is only readable by the root user
642662
exec("chmod 600 $install_dir/server/lib/$configfile");
643663
exec("chown root:root $install_dir/server/lib/$configfile");

0 commit comments

Comments
 (0)