Plesk

Cannot apply PHP Settings or PHP service is down: cannot get uid for user ‘john.doe’

Symptoms

Cause

System user of subscription(s) was renamed or removed.

Resolution

  1. Connect to the server via SSH.

  2. Find the absent user(s) mentioned in PHP-FPM pool configurations:

    # grep user * /opt/plesk/php/*/etc/php-fpm.d | cut -d= -f2 | tr -d ' ' | while read -r user; do id "$user" >/dev/null; done
    id: john.doe: no such user
    id: jane.doe: no such user

  3. Find the configuration files with these mentions:

    # grep -rin 'john.doe|jane.doe' /opt/plesk/php/*/etc/php-fpm.d
    ...
    /opt/plesk/php/8.1/etc/php-fpm.d/example.com.conf:11:[example.com]
    ..
    /opt/plesk/php/8.2/etc/php-fpm.d/example.net.conf:11:[example.net]
    ...

  4. Create a backup of the file to be safe:
    # cp -p /opt/plesk/php/8.2/etc/php-fpm.d/example.com.conf /opt/plesk/php/8.2/etc/php-fpm.d/example.com.conf.bak
  5. Remove the found files:

    # rm -rf /opt/plesk/php/8.1/etc/php-fpm.d/example.com.conf /opt/plesk/php/8.2/etc/php-fpm.d/example.net.conf

  6. Log in to Plesk.

  7. For each domain, go to Domains > example.com > PHP Settings, change some setting and click Apply to recreate configuration file. Revert the setting, if necessary.

    Note: if there are too many domains, run the following to update the settings for all domains at once (might be a long process):

    # plesk bin php_settings -u

Note: In case that the issue persists try running the repair command for each affected domain like plesk repair web -y example.com

Exit mobile version