## Create settings.php manually
vi /var/www/teampass/includes/config/settings.php
chown www-data:www-data settings.php
chmod 640 settings.php
<?php
// DATABASE connection parameters
define("DB_HOST", "localhost");
define("DB_USER", "teampass"); // your DB user
define("DB_PASSWD", "YOUR_DB_PASSWORD"); // plain text DB password
define("DB_NAME", "teampass");
define("DB_PREFIX", "teampass_");
define("DB_PORT", "3306");
define("DB_ENCODING", "utf8mb4");
define("DB_SSL", false);
// Connection options
define("DB_CONNECT_OPTIONS", array(
MYSQLI_OPT_CONNECT_TIMEOUT => 10
));
// 🔐 Secure folder (outside web root)
define("SECUREPATH", "/var/teampass/secure");
// 🔑 Encryption key file (filename inside secure folder)
define("SECUREFILE", "YOUR_KEY_FILENAME");
// Timezone
date_default_timezone_set('Europe/Stockholm');
## Create csrfp.config.php manually
vi /var/www/teampass/includes/libraries/csrfp/libs/csrfp.config.php
openssl rand -hex 32 -> CSRFP_TOKEN
mkdir -p /var/www/teampass/includes/libraries/csrfp/log
chown -R www-data:www-data /var/www/teampass/includes/libraries/csrfp/log
chmod 750 /var/www/teampass/includes/libraries/csrfp/log
chown www-data:www-data csrfp.config.php
chmod 640 csrfp.config.php
<?php
return array(
"CSRFP_TOKEN" => "RANDOM_SECRET_TOKEN",
"logDirectory" => "../log",
"failedAuthAction" => array(
"GET" => 0,
"POST" => 0
),
"errorRedirectionPage" => "",
"customErrorMessage" => "",
"jsPath" => "../js/csrfprotector.js",
"jsUrl" => "https://server.domain.com/includes/libraries/csrfp/js/csrfprotector.js",
"tokenLength" => 50,
"cookieConfig" => array(
"expire" => '',
"path" => '',
"domain" => '',
"secure" => true,
"httponly" => true,
"samesite" => "Lax"
),
"disabledJavascriptMessage" => "JavaScript must be enabled for this application to work correctly.",
"verifyGetFor" => array(
"*type=duo_check*",
"*upload.attachments.php*",
"*upload.files.php*",
"*type=ga_generate_qr*"
)
);
## Fix post install folder permissions
chmod -R 0750 /var/www/html/teampass
chown -R www-data:www-data /var/www/html/teampass
find /var/www/html/teampass -type d -exec chmod 750 {} \;
find /var/www/html/teampass -type f -exec chmod 640 {} \;
Steps to reproduce
Expected behaviour
Final tasks (run.step6.php) finish without issues and being able to continue.
Actual behaviour
Failure on tasks to create settings.php file
Failure on Initilize CSRF protection
Failure on cron job (Not exptected to complete successfully)
Failure on clean installation data
No /var/www/teampass/includes/config/settings.php created
No /var/www/teampass/includes/libraries/csrfp/libs/csrfp.config.php created
The folder permissions for /var/www/teampass/ are changed so the website is unable to load (access denied)
Server configuration
Workaround
Configuration variables (click to expand)
Important informations
Client configuration
Logs
Web server error log
Browser developer console (F12 > Console + Network)