Solved "PassengerUser" directive

Access_Denied

Verified User
Joined
Sep 7, 2021
Messages
13
Hello.
Can anyone suggest a better way (to the apache template /usr/local/directadmin/data/templates/custom? in /etc/httpd/conf/extra/passenger.conf? or in any other?) to add the lines:

Code:
 <IfModule mod_passenger.c>
    PassengerUser USERNAME
</IfModule>

(note: USERNAME is a variable denoting the user's name).
Since (we are using cloudlinux with nginx_apache and Python selector) after recent update alt-mod-passenger package to 6.0.14-3 in all hosts with python error:
Code:
Passenger error #3

PassengerUser directive is not set for the virtual host of the current request.)

So, I can add PassengerUser USERNAME to any apache config with a restart of httpd, but after cd /usr/local/directadmin/custombuild && ./build rewrite_confs these changes will disappear.
USERNAME is a variable denoting the user's name.
Internal https://cloudlinux.zendesk.com/hc/en-us/articles/9857558373916 says:
Issue
After a yum update I found my NodeJS applications throw the following errors:

Passenger error #3

PassengerUser directive is not set for the virtual host of the current request.

Solution
As a temporary workaround, you can downgrade alt-mod-passenger package to 6.0.14-2:
Code:
yum downgrade alt-mod-passenger

Then we recommend you correct the virtual hosts' configurations and set the PassengerUser directive and upgrade again.
Cause
The error that you encounter is a result of the latest alt-mod-passenger package update (6.0.14-3) which contains the following bug fix:

CLOS-1855: Deny passenger requests if PassengerUser directive is absent

With the latest alt-mod-passenger version, in case of PassengerUser is not set for VirtualHost, processing a request is denied because it is a wrong VirtualHost configuration and leads to vulnerabilities.
 
./directadmin/data/templates/custom/cust_httpd.CUSTOM.1.post
Code:
<IfModule mod_passenger.c>
    PassengerUser |USER|
</IfModule>

da build rewrite_confs
 
./directadmin/data/templates/custom/cust_httpd.CUSTOM.1.post
Code:
<IfModule mod_passenger.c>
    PassengerUser |USER|
</IfModule>

da build rewrite_confs
Thank you! But DA set its value in "PassengerUser |USER|" as reseller name, not user name.
PassengerUser reseller.
I'm not sure if this will work if I update alt-mod-passenger.
 
It weird.

"USER" should be username. and
"CREATOR" should be reseller name.

it docs and you can see all Tokens inside "Custom HTTPD Configurations " page.


did you try checking on other user ?
 
Sorry,
everything turned out to be correct (I just looked at the user config in the suspension incorrectly) - for them it is a reseller.
For all active users, everything is correct - PassengerUser username.
Thank you again!
 
today they released alt-mod-passenger-6.0.14-4 maybe this will solve problem without custom-confs.
 
Back
Top