Apache fails to start: "httpd: bad user name ..."

Created:

2016-11-16 13:20:02 UTC

Modified:

2017-08-16 18:28:09 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Apache fails to start: "httpd: bad user name ..."

Applicable to:

  • Plesk for Linux
  • Plesk 11.x for Windows

Symptoms

Apache cannot start and fails with an error:

httpd: bad user name domain_ftp

Cause

  1. The FTP users of one of the domains with physical hosting are missing from the system.

Resolution

  1. Create the missing FTP users:

    echo "SELECT login, home, shell FROM sys_users"| \\
    mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa | \\
    while read login home shell ; do
    grep -q ^$login: /etc/passwd || \\
    PSA_PASSWD="`head /dev/urandom | md5sum | cut -c12-24`" \\
    /usr/local/psa/admin/sbin/usermng --add-user --user=$login --homedir=$home --shell=$shell
    done
  2. Rebuild the web server configuration:

    /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
  3. Restart Apache web server:

    /etc/init.d/httpd restart

    See also #213902625

Have more questions? Submit a request
Please sign in to leave a comment.