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 37d95d4b131..860a0ffaa12 100644 --- a/htdocs/install/etape5.php +++ b/htdocs/install/etape5.php @@ -288,9 +288,10 @@ if ($_POST["action"] == "set") $fp = @fopen($lockfile, "w"); if ($fp) { - fwrite($fp, "This is a lock file to prevent use of install pages"); + 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(444)); + @chmod($lockfile, octdec($force_install_lockinstall)); $createlock=1; } } @@ -337,9 +338,10 @@ 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"); + 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(444)); + @chmod($lockfile, octdec($force_install_lockinstall)); $createlock=1; } }