When attempting to update WordPress or WordPress plugins, you may be asked for FTP connection details.
This typically occurs when scripts are being executed with the permissions of the apache user, "nobody", instead of the owner of the scripts ( the cPanel user ).
For example, while running the
top command in SSH to view running processes and then visiting a website (example.tld) in a browser, you will see the user who owns the process that spawned while visiting example.tld is the "nobody" user:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
$PID nobody 20 0 493456 35928 24436 R 8.6 0.4 0:00.26 php-cgi
You can install mod_suexec or mod_ruid2 by following these steps:
1. Log into WHM.
2. Navigate to EasyApache 4.
3. Select "Customize" under "Currently Installed Packages".
4. Select "Apache modules" on the left side menu.
5. Search for and mark mod_suexec or mod_ruid2 for installation. Note that you can only install one of these modules.
6. Select "Review" on the left side menu and then "Provision" when the option appears.
Further information on the importance of running scripts as the script owner can be found here: What's the importance of running scripts as the user?