Skip to content

Commit 3e0fc86

Browse files
author
Till Brehm
committed
Changed owner of ispconfig server files from ispconfig to root user.
1 parent 4253964 commit 3e0fc86

File tree

4 files changed

+56
-16
lines changed

4 files changed

+56
-16
lines changed

install/dist/lib/fedora.lib.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -958,12 +958,22 @@ public function install_ispconfig()
958958
$this->db->query($sql);
959959
}
960960

961-
//* Chmod the files
962-
$command = "chmod -R 750 $install_dir";
961+
/// chown install dir to root and chmod 755
962+
$command = 'chown root:root '.$install_dir;
963+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
964+
$command = 'chmod 755 '.$install_dir;
965+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
966+
967+
//* Chmod the files and directoreies in the install dir
968+
$command = 'chmod -R 750 '.$install_dir.'/*';
963969
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
964970

965-
//* chown the files to the ispconfig user and group
966-
$command = "chown -R ispconfig:ispconfig $install_dir";
971+
//* chown the interface files to the ispconfig user and group
972+
$command = 'chown -R ispconfig:ispconfig '.$install_dir.'/interface';
973+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
974+
975+
//* chown the server files to the root user and group
976+
$command = 'chown -R root:root '.$install_dir.'/server';
967977
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
968978

969979
//* Make the global language file directory group writable

install/dist/lib/gentoo.lib.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -850,12 +850,22 @@ public function install_ispconfig()
850850
$this->db->query($sql);
851851
}
852852

853-
//* Chmod the files
854-
$command = "chmod -R 750 $install_dir";
853+
// chown install dir to root and chmod 755
854+
$command = 'chown root:root '.$install_dir;
855+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
856+
$command = 'chmod 755 '.$install_dir;
857+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
858+
859+
//* Chmod the files and directoreies in the install dir
860+
$command = 'chmod -R 750 '.$install_dir.'/*';
855861
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
856862

857-
//* chown the files to the ispconfig user and group
858-
$command = "chown -R ispconfig:ispconfig $install_dir";
863+
//* chown the interface files to the ispconfig user and group
864+
$command = 'chown -R ispconfig:ispconfig '.$install_dir.'/interface';
865+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
866+
867+
//* chown the server files to the root user and group
868+
$command = 'chown -R root:root '.$install_dir.'/server';
859869
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
860870

861871
//* Make the global language file directory group writable

install/dist/lib/opensuse.lib.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,12 +1028,22 @@ public function install_ispconfig()
10281028
$this->db->query($sql);
10291029
}
10301030

1031-
//* Chmod the files
1032-
$command = "chmod -R 750 $install_dir";
1031+
// chown install dir to root and chmod 755
1032+
$command = 'chown root:root '.$install_dir;
1033+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
1034+
$command = 'chmod 755 '.$install_dir;
1035+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
1036+
1037+
//* Chmod the files and directoreies in the install dir
1038+
$command = 'chmod -R 750 '.$install_dir.'/*';
10331039
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
10341040

1035-
//* chown the files to the ispconfig user and group
1036-
$command = "chown -R ispconfig:ispconfig $install_dir";
1041+
//* chown the interface files to the ispconfig user and group
1042+
$command = 'chown -R ispconfig:ispconfig '.$install_dir.'/interface';
1043+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
1044+
1045+
//* chown the server files to the root user and group
1046+
$command = 'chown -R root:root '.$install_dir.'/server';
10371047
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
10381048

10391049
//* Make the global language file directory group writable

install/lib/installer_base.lib.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,12 +1885,22 @@ public function install_ispconfig() {
18851885
}
18861886

18871887

1888-
//* Chmod the files
1889-
$command = 'chmod -R 750 '.$install_dir;
1888+
// chown install dir to root and chmod 755
1889+
$command = 'chown root:root '.$install_dir;
1890+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
1891+
$command = 'chmod 755 '.$install_dir;
1892+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
1893+
1894+
//* Chmod the files and directoreies in the install dir
1895+
$command = 'chmod -R 750 '.$install_dir.'/*';
18901896
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
18911897

1892-
//* chown the files to the ispconfig user and group
1893-
$command = 'chown -R ispconfig:ispconfig '.$install_dir;
1898+
//* chown the interface files to the ispconfig user and group
1899+
$command = 'chown -R ispconfig:ispconfig '.$install_dir.'/interface';
1900+
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
1901+
1902+
//* chown the server files to the root user and group
1903+
$command = 'chown -R root:root '.$install_dir.'/server';
18941904
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
18951905

18961906
//* Make the global language file directory group writable

0 commit comments

Comments
 (0)