• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Additional (no root) User for PHP Script across all Resellers

Code-Specialist

New Pleskian
Server operating system version
Ubuntu 18.04.6 LTS
Plesk version and microupdate number
18.0.58 Update #2
Hi There,

PLESK RESELLER EDITION !!!
I am about to write a program, which helps my clients to maintain their webspaces automatically.
For my personal overview this script should call PHP scripts within their accounts and should habe access to all of their directories.
The script will be start by cron. Not by apache. (no Webaccess)
It is necessary, this user ist NOT root of cause.
My first Idea was, to create a client user manually and add him to sudoers to give him rights. But I have no Idea, how this will impact into plesk userrightadministration....
And further I don't know, what will happen, If I will update Plesk to its next Version.

Is there a "Plesk-way" to solve my Problem ?
My first try was to create a new FTP User for each Domain. But currently there are more then 70 domains - several clients and variant subdomains, so I really won't do that manually.

Thanks for your Ideas and helping me out.

Michael

--
Ubuntu 18.04.6 LTS
Plesk Obsidian Reseller
 
Dear Code-Specialist,

I am in the same boat as you: we only have Reseller permissions, and sometimes I want to log in as a user to inspect things or execute a script for one or more users.

My solution (which took me some time to build):
  • I asked our provider to open up Plesk XML API access to a specific IP address
  • I wrote a script to retrieve all subscriptions using the API in JSON format
  • I wrote a second script to SSH to selected subscriptions using the retrieved subscription information
I can use the second script to execute arbitrary scripts and to log in as particular users (provided they have SSH enabled).

There are significant security risks:
  • Anyone who can access the IP address and user credentials to use can use the same API. So be sure you only enabled this for a very safe host.
  • The API doesn't offer read-only access, so anyone who can retrieve information can also destroy things. (And I did destroy things, purely by mistake, while developing my script.)
  • Anyone who can access the subscription information will have all SSH/FTP passwords in plaintext. So make sure that JSON file never gets leaked.
If you're still interested, I'm happy to share my code.
 
Back
Top