Skip to content

[BUG] Problem with installer/final tasks (Fresh install) + Workaround #5209

@ciph

Description

@ciph

Steps to reproduce

  1. Install Ubuntu, Apache, PHP, MariaDB and configure according to documentations.
  2. Download latest zip file and extract, set up permissions.
  3. Run web installer.
  4. After final steps failed, create settings.php and csrfp.config.php manually (WORKAROUND)

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

Operating system Ubuntu 24.04
Web server Apache
Database MariaDB 10.11.14
PHP version PHP8.2/8.3
TeamPass version 3.1.7.6
Install type Fresh install
Deployment Standard

Workaround

Configuration variables (click to expand)
## 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 {} \;

Important informations

Updated from an older Teampass or fresh install Fresh install
Using Docker No

Client configuration

Browser Edge/Chrome
Operating system Windows 11

Logs

Web server error log

[Fri May 08 13:05:29.841309 2026] [core:error] [pid 1130:tid 130585980819136] (13)Permission denied: [client x.x.x.x:13086] AH00035: access to /install/install-steps/run.step6.php denied (filesystem path '/var/www/html/install') because search permissions are missing on a component of the path, referer: https://server.domain.com/install/install.php

Browser developer console (F12 > Console + Network)

Insert the relevant console/network errors here  and especially the answer of the query that failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions