• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Apache and FTP

maw

Basic Pleskian
hello,

i discovered a problem, when a user change the initial ftp account user name.

i get then a error mail:

Generating new Apache configuration on host <.....> failed because the following error(s) occurred:

httpd: bad user name xxxxxx

Please fix error(s) in templates of Apache configuration and retry generating the configuration file.

the problem is, that when somebody change the initial ftp user, it changed the complete sysuser name. suexec dont find then in the vhost configured username any more, because (so it looks like) when the client change the username plesk doesn't reconfigure the vhosts.

is there a fix out? or is it possible to forbid the change the initial ftp username?
 
Last edited:
httpd: bad user name xxxxxx

Usually it means that this system user was missing in the system. You can repair it with following method, for example:

mysql> select * from sys_users where login='xxxxxx';
+----+------------+------------+---------------------------------------+------------+-------+-----------+
| id | login | account_id | home | shell | quota | mapped_to |
+----+------------+------------+---------------------------------------+------------+-------+-----------+
| 46 | xxxxxx | 226 | /var/www/vhosts/domain.com | /bin/false | 0 | NULL |
+----+------------+------------+---------------------------------------+------------+-------+-----------+
1 row in set (0.00 sec)

# /usr/local/psa/admin/sbin/usermng --add-user --user=xxxxxx --homedir=/var/www/vhosts/domain.com --shell=/bin/false
 
hi Igor,

thanks for your answer, i know what it means and i checked the database on a test domain right now. when i change the initial ftp username the table sys_users get also updated (also the sysuser self). ...but i got the same email like above ....

so from where else get your Apache configuration the old user name? the entire vhost is not running any more because of the ftp username change (vhost binded on sysuser). ...or why have the vhost reconfiguration a problem?

also it cannot be real, that i have to change manually something in the database when a user change his initial ftp username.

M.

ps. it's to bad, that the proftpd users are sys users and don't come out from a mysql table.

pps. i tried it right now manually "/usr/local/psa/admin/bin/httpdmng --reconfigure-domain domain.tld" but got also an

2011-02-10T10:26:39-05:00 ERR (3): Apache config (12973515990.13064500) generation failed: httpd: bad user name xxxxxxx

httpd: bad user name xxxxxxx

but the new sysuser is correct and also correct written in the sys_user table

ppps. generally it would be a good thing to let the user not change the first (initial) ftp user name ... so you don't have to change sys users and not to rewrite the apache config.... less stress and saving resources and trouble ...
 
Last edited:
like i said also via email. the problem is not that plesk dont update the user in the db and the rights on the files, this works. the problem is, that the apache reconfiguration script dont find the new user. it still tries to generate the vhost with the old user. ...so from where get the script the old name?

maybe it is a bug with existing accounts after the plesk update self?
 
This one is critical.
Any user, any time can crash your web service.
Very sad.
 
Same Problem. If the user changes FTP-Account to the same like the login name (or another - I didn't tried it) there is no error-message while changing, so the user thinks everthing is fine. But Apcahe configuration can't be updated correctly after the change. Error is fixed after changing user-account back.
---
E-Mail-Error:
Das Generieren einer neuen Apache-Konfiguration auf Host <www.mydomain.com> ist fehlgeschlagen. Folgende(r) ist(sind) aufgetreten:
httpd: bad user name
---
On PLesk-Interface:
Fehler: Es wurden keine neuen Konfigurationsdateien für den Apache-Webserver erstellt, da Fehler in den Konfiguration-Templates vorhanden sind. Die detaillierte Fehlermeldung wurde Ihnen per E-Mail zugesandt. Bitte überprüfen Sie Ihre E-Mails, beheben Sie die Fehler und klicken Sie auf hier, um die Konfiguration erneut zu starten.

Please fix it fast!
 
he,

for me its fixed now. They provided custom fix for my server. Unfortunately i don't know what the problem was. Also maybe the latest components update for Plesk fix this now generally.

M.

ps. Anyway I would suggest to the Plesk team to let the user not change the primary ftp username. Its a bit to much liberty.
 
Last edited:
hello
i have the same problem with httpd service
when i want to restart the service i got this error:
httpd: bad user name
i check the user in mysql psa database with this command
mysql> select * from sys_users where login='xxxxxx';
but i got this result
mysql> select * from sys_users where login='mfatemi5';
Empty set (0.00 sec)

what is the solution.

at the end i must be told you i remove the account that have the problem
 
Back
Top