↑ ↓ select, Enter open, Esc close

Find the system user of each domain in Plesk

root@server
plesk db "SELECT d.name, s.login FROM domains d JOIN hosting h ON h.dom_id = d.id JOIN sys_users s ON s.id = h.sys_user_id ORDER BY d.name"

Maps each domain with web hosting to its system user. Useful when top shows a process of an unknown user, files have the wrong owner, or mail sent via PHP needs to be traced to a customer.

Also searched as

  • which domain does this linux user belong to
  • find ftp user of a domain plesk
  • which customer owns this process

Related one-liners

All in Plesk

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.