diff --git a/build/deb/install.forced.php.install b/build/deb/install.forced.php.install
index 105228e906c..518e1718143 100755
--- a/build/deb/install.forced.php.install
+++ b/build/deb/install.forced.php.install
@@ -12,5 +12,5 @@ $force_install_databaserootlogin='__SUPERUSERLOGIN__';
$force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
-$force_install_lockinstall='1';
+$force_install_lockinstall='444';
?>
\ No newline at end of file
diff --git a/build/dmg/dolimamp/install.forced.php b/build/dmg/dolimamp/install.forced.php
index e5aa3c60065..74673452ceb 100644
--- a/build/dmg/dolimamp/install.forced.php
+++ b/build/dmg/dolimamp/install.forced.php
@@ -12,5 +12,5 @@ $force_install_databaserootlogin='root';
$force_install_databaserootpass='root';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
-$force_install_lockinstall='1';
+$force_install_lockinstall='444';
?>
\ No newline at end of file
diff --git a/build/exe/doliwamp/install.forced.php.install b/build/exe/doliwamp/install.forced.php.install
index c024151ec0e..162dd21618f 100644
--- a/build/exe/doliwamp/install.forced.php.install
+++ b/build/exe/doliwamp/install.forced.php.install
@@ -12,5 +12,5 @@ $force_install_databaserootlogin='root';
$force_install_databaserootpass='WAMPMYSQLNEWPASSWORD';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
-$force_install_lockinstall='1';
+$force_install_lockinstall='644';
?>
\ No newline at end of file
diff --git a/htdocs/install/etape5.php b/htdocs/install/etape5.php
index 6cb62014f26..0cb3ba8d2f1 100644
--- a/htdocs/install/etape5.php
+++ b/htdocs/install/etape5.php
@@ -149,7 +149,7 @@ if ($_POST["action"] == "set" || preg_match('/upgrade/i',$_POST["action"]))
$conf->setValues($db);
// Create user
- include_once(DOL_DOCUMENT_ROOT ."/user/user.class.php");
+ include_once(DOL_DOCUMENT_ROOT ."/user/class/user.class.php");
$createuser=new User($db);
$createuser->id=0;
@@ -288,10 +288,11 @@ if ($_POST["action"] == "set")
$fp = @fopen($lockfile, "w");
if ($fp)
{
- fwrite($fp, "This is a lock file to prevent use of install pages");
- fclose($fp);
- @chmod($lockfile, octdec(444));
- $createlock=1;
+ if ($force_install_lockinstall == 1) $force_install_lockinstall=444; // For backward compatibility
+ fwrite($fp, "This is a lock file to prevent use of install pages (set with permission ".$force_install_lockinstall.")");
+ fclose($fp);
+ @chmod($lockfile, octdec($force_install_lockinstall));
+ $createlock=1;
}
}
if (empty($createlock))
@@ -311,7 +312,7 @@ if ($_POST["action"] == "set")
{
// If here MAIN_VERSION_LAST_UPGRADE is not empty
print $langs->trans("VersionLastUpgrade").': '.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
';
- print $langs->trans("VersionProgram").': '.DOL_VERSION.'';
+ print $langs->trans("VersionProgram").': '.DOL_VERSION.'
';
print $langs->trans("MigrationNotFinished").'
';
print "
";
@@ -337,10 +338,11 @@ elseif (preg_match('/upgrade/i',$_POST["action"]))
$fp = @fopen($lockfile, "w");
if ($fp)
{
- fwrite($fp, "This is a lock file to prevent use of install pages");
- fclose($fp);
- @chmod($lockfile, octdec(444));
- $createlock=1;
+ if ($force_install_lockinstall == 1) $force_install_lockinstall=444; // For backward compatibility
+ fwrite($fp, "This is a lock file to prevent use of install pages (set with permission ".$force_install_lockinstall.")");
+ fclose($fp);
+ @chmod($lockfile, octdec($force_install_lockinstall));
+ $createlock=1;
}
}
if (empty($createlock))