Healthcheck fails after upgrade from 4.4.2 to 4.5.0

Hello,

I just upgraded Passbolt CE server from 4.4.2 to 4.5.0. Everything seems to work fine, except for healthcheck, which returns an http code 500 Internel Server Error.

I upgraded as per https://help.passbolt.com/hosting/update/debian-package.

apt upgrade gave the folling messages (witherror):

S’està configurant passbolt-ce-server (4.5.0-1)…
S’està instal·lant una versió nova del fitxer de configuració /etc/passbolt/Migrations/20210125212543_V320TransferFileStorageToAvatars.php…
S’està instal·lant una versió nova del fitxer de configuració /etc/passbolt/app.php…
S’està instal·lant una versió nova del fitxer de configuració /etc/passbolt/default.php…
S’està instal·lant una versió nova del fitxer de configuració /etc/passbolt/version.php…
PHP Warning: require(/etc/passbolt/requirements.php): Failed to open stream: Permission denied in /usr/share/php/passbolt/bin/cake.php on line 4
PHP Fatal error: Uncaught Error: Failed opening required ‘/etc/passbolt/requirements.php’ (include_path=‘.:/usr/share/php’) in /usr/share/php/passbolt/bin/cake.php:4
Stack trace:
#0 {main}
thrown in /usr/share/php/passbolt/bin/cake.php on line 4
dpkg: s’ha produït un error en processar el paquet passbolt-ce-server (–configure):
el subprocés «s’ha instal·lat el script passbolt-ce-server del paquet post-installation» retornà el codi d’eixida d’error 255
S’estan processant els activadors per a man-db (2.11.2-2)…
S’han trobat errors en processar:
passbolt-ce-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Running healthcheck from the command line gives:

$ sudo -H -u nginx bash -c “/usr/share/php/passbolt/bin/cake passbolt healthcheck”

 ____                  __          ____  
/ __ \____  _____ ____/ /_  ____  / / /_ 

/ // / __ `/ / / __ / __ / / _/
/ / // ( |
) /
/ / /
/ / / /
/
/ _
,
/
//./_//__/

Open source password manager for teams

Healthcheck shell…2024-02-13 08:54:20 warning: require_once(/etc/passbolt/Migrations/20231211195437_V450AddExpiredDateFieldToResources.php): Failed to open stream: Permission denied
warning: 2 :: require_once(/etc/passbolt/Migrations/20231211195437_V450AddExpiredDateFieldToResources.php): Failed to open stream: Permission denied on line 810 of /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php
2024-02-13 08:54:20 error: [Error] Failed opening required ‘/etc/passbolt/Migrations/20231211195437_V450AddExpiredDateFieldToResources.php’ (include_path=‘.:/usr/share/php’) in /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php on line 810

And status report:

$ sudo /usr/share/php/passbolt/bin/status-report
PHP Warning: require(/etc/passbolt/requirements.php): Failed to open stream: Permission denied in /usr/share/php/passbolt/bin/cake.php on line 4
PHP Fatal error: Uncaught Error: Failed opening required ‘/etc/passbolt/requirements.php’ (include_path=‘.:/usr/share/php’) in /usr/share/php/passbolt/bin/cake.php:4
Stack trace:
#0 {main}
thrown in /usr/share/php/passbolt/bin/cake.php on line 4

System information:

$ uname -a
Linux v2202312212067250125 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux
$ mariadb --version
mariadb Ver 15.1 Distrib 10.11.6-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
$ php --version
PHP 8.3.2-1+0~20240120.16+debian12~1.gbpb43448 (cli) (built: Jan 20 2024 14:14:39) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.2, Copyright (c) Zend Technologies
with Zend OPcache v8.3.2-1+0~20240120.16+debian12~1.gbpb43448, Copyright (c), by Zend Technologies

Directory permissions:

$ ls -l /usr/share/php
total 8
drwxr-xr-x 3 root root 4096 12 de gen. 11:09 8.3
drwxr-xr-x 9 root root 4096 13 de febr. 09:50 passbolt
$ ls -l /usr/share/php/passbolt/
total 32
drwxr-xr-x 2 root root 4096 13 de febr. 09:50 bin
-rw-r–r-- 1 root root 649 8 de febr. 12:29 index.php
drwxr-xr-x 3 root root 4096 12 de gen. 13:15 plugins
drwxr-xr-x 3 root root 4096 12 de gen. 13:15 resources
drwxr-xr-x 18 root root 4096 13 de febr. 09:50 src
drwxr-xr-x 10 root root 4096 12 de gen. 13:15 templates
drwxr-xr-x 32 root root 4096 13 de febr. 09:50 vendor
drwxr-xr-x 7 root root 4096 13 de febr. 09:50 webroot
$ ls -ld /etc/passbolt/
dr-xr-x— 6 nginx nginx 4096 13 de febr. 09:50 /etc/passbolt/
$ sudo ls -l /etc/passbolt/
total 156
-r–r----- 1 nginx nginx 20065 29 de nov. 11:48 app.default.php
-r–r----- 1 nginx nginx 20121 8 de febr. 12:29 app.php
-r–r----- 1 nginx nginx 2044 29 de nov. 11:48 audit_logs.php
-r–r----- 1 nginx nginx 1061 29 de nov. 11:48 bootstrap_cli.php
-r–r----- 1 nginx nginx 7699 29 de nov. 11:48 bootstrap.php
-r–r----- 1 nginx nginx 65 29 de nov. 11:48 bootstrap_plugins.php
-r–r----- 1 nginx nginx 20653 8 de febr. 12:29 default.php
dr-xr-x— 2 nginx nginx 4096 12 de gen. 14:04 gpg
dr-xr-x— 2 nginx nginx 4096 12 de gen. 13:15 jwt
dr-xr-x— 2 nginx nginx 20480 13 de febr. 09:50 Migrations
-r–r----- 1 nginx nginx 5605 29 de nov. 11:48 passbolt.default.php
-r–r----- 1 nginx nginx 2432 12 de gen. 14:04 passbolt.php
-r–r----- 1 nginx nginx 2642 29 de nov. 11:48 paths.php
-r–r----- 1 nginx nginx 1584 29 de nov. 11:48 requirements.php
-r–r----- 1 nginx nginx 13504 29 de nov. 11:48 routes.php
dr-xr-x— 2 nginx nginx 4096 13 de febr. 09:50 schema
-r–r----- 1 nginx nginx 201 8 de febr. 12:29 version.php

Any idea about what’s going on?

Thanks in advance

Hey @nohose , welcome to the forum!

The first thing that sticks out is that you have php 8.3 which isn’t yet supported.

Also I see you are using the nginx user instead of the www-data user, could you mention what all steps or changes you made from the standard install path with the package?

Hello @clayton

I did initially install Passbolt on a server with already php 8.2, mariadb and nginx installed. What I did was to comment out calling compliance_check in passbolt-repo-setup.ce.sh (both Debian 12 and IPv6 being Ok).

Installed passbolt with apt install

Since nginx on this server runs under nginx user and group, I did sudo chown -R nginx:nginx /etc/passbolt

Which made me think (thanks!) that probably something changed with the upgrade in /etc/passbolt. Indeed, file 20231211195437_V450AddExpiredDateFieldToResources.php is owned by www-data.

After changing ownership to nginx user, healthcheck works again.

It complained about database schema not being up to date, but after running the script, everything seems OK.

One last question, status report complains about composercommand not found:

$ sudo -u nginx /usr/share/php/passbolt/bin/status-report

     ____                  __          ____  
    / __ \____  _____ ____/ /_  ____  / / /_ 
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/ 
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /    
 /_/    \__,_/____/____/_.___/\____/_/\__/   

 Open source password manager for teams
-------------------------------------------------------------------------------
Passbolt CE 4.5.0
Cakephp 4.4.17
Linux v2202312212067250125 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux
PHP 8.3.2-1+0~20240120.16+debian12~1.gbpb43448 (cli) (built: Jan 20 2024 14:14:39) (NTS)
mysql  Ver 15.1 Distrib 10.11.6-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper
gpg (GnuPG) 2.2.40
libgcrypt 1.10.1
 ERROR: /usr/share/php/passbolt/bin/utils.sh: línia 64: composer: no s'ha trobat l'ordre

Is it important?

Thanks a lot

Hey @nohose ,

composer is not installed and not required in the on premise packages, so you can ignore this error for now. We will get this fixed in the coming version. Thanks for the catch!

I want to apologise first of all about this off topic comment, but are you using Catalan translations?

No, Passbolt is in English. Debian is localized, Catalan.
No special reason. If it helps you anyhow I can set it to Catalan. I’d be happy to provide feedback.

1 Like

It’s okay, use what you prefer.
It was just because I’m translating Passbolt to Cataln in my free time and you are the first person I saw who uses it hahahahaha

1 Like