PLESK COMMAND LINE INTERFACE

Chapter 4. FAQ

Q: I'm trying to offer free hosting and don't know of any way to allow the public to create their own accounts from a form. Can you tell me if there is any available scripts or programs for this?

A: You can use Plesk Command Line Interface to perform Plesk operations in your scripts. You can find corresponding documentation here. Please note that CGI scripts are run as domain ('FTP') user. You can use various wrappers to run Plesk Command Line Interface scripts as root with secure way.


Q: When I try to run Command Line Interface scripts remotely (from another server), I get the following error:

************************************************************************
Unable to chmod file /etc/psa/psa.key: Operation not permitted
Unable to open key file /etc/psa/psa.key: Permission denied
************************************************************************

A: Please note that Plesk Command Line Interface scripts have to be executed as 'root' user.


Q: I have to setup hundreds of E-mail accounts at once for a customer and I was thinking of using Plesk creation utillities for that. Do you have a simple shell script which can read a DB or txt file to setup multiple accounts or domails using the Command Line Interface scripts?

A: For example, if you have CSV like this:

user@domain.com,passwd
where user@domain.com -- is mailname
passwd -- password for mailbox

you should run as root:

bash# awk -F , '{print "/usr/local/psa/bin/mail.sh -c "$1" -mailbox true -passwd "$2}' list.csv | sh



to top