added checks for file permissions

This commit is contained in:
Roland Gruber 2005-10-23 09:20:19 +00:00
parent 731692e511
commit 09f692b87a
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,6 @@
??? 0.5.2 ??? 0.5.2
- New module for SSH public keys - New module for SSH public keys
- check file permissions on login page
- fixed bugs: - fixed bugs:
-> creation of home directories did not work -> creation of home directories did not work

View File

@ -149,6 +149,15 @@ function display_LoginPage($config_object) {
StatusMessage("ERROR", "Your PHP has no gettext support!", "Please install gettext for PHP."); StatusMessage("ERROR", "Your PHP has no gettext support!", "Please install gettext for PHP.");
echo "<br><br>"; echo "<br><br>";
} }
// check file permissions
$writableDirs = array('config', 'config/profiles', 'config/pdf', 'sess', 'tmp', );
for ($i = 0; $i < sizeof($writableDirs); $i++) {
$path = realpath('../') . "/" . $writableDirs[$i];
if (!is_writable($path)) {
StatusMessage("ERROR", _('The directory %s is not writable for the web server. Please change your file permissions.'), '', array($path));
echo "<br>";
}
}
?> ?>
<table width="650" align="center" border="2" rules="none" bgcolor="white"> <table width="650" align="center" border="2" rules="none" bgcolor="white">
<tr> <tr>