upcp -sb fails on the assert-account-works task

Bug Report Template

Description

upcp -sb fails on the assert-account-works task

Steps to Reproduce

[root@svr02 ~]# upcp -sb apnscp/assert-account-works

PLAY [localhost] *************************************************************************************************************************************************************************************

TASK [apnscp/assert-account-works : Create new domain] ***********************************************************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “cmd”: [“/usr/local/apnscp/bin/AddDomain”, “-o”, “json”, “-c”, “siteinfo,domain=apiscp-int-bjwrfjprbuhtecfaevefhvyh.test”, “-c”, “siteinfo,admin_user=izmhgucrxvjb”, “-c”, “dns,enabled=0”, “-c”, “dns,provider=null”, “-c”, “mail,enabled=0”, “-c”, “mail,provider=null”, “-c”, “ssl,enabled=0”, “-c”, “apache,jail=1”], “delta”: “0:00:00.269940”, “end”: “2026-06-11 22:39:27.570654”, “failed_when_result”: true, “msg”: “non-zero return code”, “rc”: 255, “start”: “2026-06-11 22:39:27.300714”, “stderr”: “”, “stderr_lines”: , “stdout”: “[{"message":"no billing identifier specified for site, generated apnscp-GNZWPZHV'\",\"severity\":4,\"caller\":\"Opcenter\\\\Service\\\\Validators\\\\Billing\\\\Invoice::valid\",\"bt\":null},{\"message\":\"Telemetry feature disabled on server. Disabling metrics collection\",\"severity\":8,\"caller\":\"Opcenter\\\\Service\\\\Validators\\\\Metrics\\\\Enabled::valid\",\"bt\":null},{\"message\":\"no mysql database prefix specified - suggesting apis_‘","severity":4,"caller":"Opcenter\\Service\\Validators\\Mysql\\Dbaseprefix::valid","bt":null},{"message":"failed verification on service apache': check on apache’,webuser' failed\",\"severity\":16,\"caller\":\"Opcenter\\\\Account\\\\Create::installServices\",\"bt\":null},{\"message\":\"fatal(): failed to create account\",\"severity\":64,\"caller\":\"Opcenter\\\\Filesystem::populate\",\"bt\":null}]", "stdout_lines": ["[{\"message\":\"no billing identifier specified for site, generated apnscp-GNZWPZHV’","severity":4,"caller":"Opcenter\\Service\\Validators\\Billing\\Invoice::valid","bt":null},{"message":"Telemetry feature disabled on server. Disabling metrics collection","severity":8,"caller":"Opcenter\\Service\\Validators\\Metrics\\Enabled::valid","bt":null},{"message":"no mysql database prefix specified - suggesting apis_'\",\"severity\":4,\"caller\":\"Opcenter\\\\Service\\\\Validators\\\\Mysql\\\\Dbaseprefix::valid\",\"bt\":null},{\"message\":\"failed verification on service apache’: check on apache',webuser’ failed","severity":16,"caller":"Opcenter\\Account\\Create::installServices","bt":null},{"message":"fatal(): failed to create account","severity":64,"caller":"Opcenter\\Filesystem::populate","bt":null}]”]}

Expected Behavior

test account is created then removed

Actual Behavior

errors

Environment

ApisCP version: cpcmd misc:cp-version
revision: a3cf6d8d6b515d463db8a4e3eb9bf62c8a90cc40
timestamp: 1780934848
ver_maj: 3
ver_min: 2
ver_patch: 48
ver_pre: 65-ga3cf6d8d6
dirty: false
debug: false

Operating System: uname -r
4.18.0-553.123.2.el8_10.x86_64

Additional Information

occurred during upcp -sbf

As you’ve fast-forwarded to HEAD per Discord, ensure all migrations have completed first before attempting a platform scrub. Along the way were 2 critical changes to both PAM and NSS modules.

Both pam-apnscp and nss-apnscp are v2, formerly v1. Migrations may be run as:

cd /usr/local/apnscp
./artisan migrate --force

Complete migrations before performing a scrub.

was the first thing after resetting to master.

[root@svr01 ~]# cd /usr/local/apnscp
[root@svr01 apnscp]# ./artisan migrate --force
Nothing to migrate.
Nothing to migrate.

rpm -q pam-apnscp nss-apnscp

These should both be on 2.0. If not, dnf update -y

Versions are;
pam-apnscp-2.0-4.x86_64
nss-apnscp-2.0-1.x86_64

Sounds like your default plan still references apache,webuser. This was renamed to php,user.

grep -rs webuser /usr/local/apnscp/resources/templates

For any plan with service type apache, apache,webuser is now php,user and apache,jail is now always enabled when PHP-FPM is present. Previously it was possible to mix PHP-FPM and libphp SAPI models; now it’s all or nothing. PHP-FPM can be toggled for a site by setting php,enabled. By default it follows whether a HTTP server is present.

yeah, our custom plans were made many years ago, still had that apache user ref. I’ll fix that up and hopefully that fixes it :slight_smile:

I’ve added support to scan/update plans that’ll clear this up going forward.

# ./artisan opcenter:plan --update
Scanning basic
basic converted
Scanning first
INFO   : apache,jail remapped to php,enabled
INFO   : apache,webuser remapped to php,user
first converted
Scanning a
a converted
Scanning custom
INFO   : apache,webuser remapped to php,user
custom converted