Parallels Plesk Panel - 8.6 - Unix Reference Guide

Parallels® Plesk Control Panel
ISBN: N/A Parallels 660 SW 39th Street Suite 205 Renton, Washington 98057 USA Phone: +1 (425) 282 6400 Fax: +1 (425) 282 6444
© Copyright 1999-2008, Parallels, Inc. All rights reserved
Distribution of this work or derivative of this work in any form is prohibited unless prior written
permission is obtained from the copyright holder.
Patented technology protected by U.S.Patents 7,328,225; 7,325,017; 7,293,033; 7,099,948;
7,076,633.
Patents pending in the U.S. Product and service names mentioned herein are the trademarks of their respective owners.
Contents
Preface 5
About This Guide ........................................................................................................................... 5
Who Should Read This Document ................................................................................................ 5
Typographical Conventions ........................................................................................................... 6
Feedback ....................................................................................................................................... 6
History of Changes in CL Utilities 7
Overview 9
Getting Started with Command Line Utilities 11
Using Command Line Utilities 12
Administrator's Server Preferences: admin Utility ....................................................................... 14
Anonymous FTP Access: anonftp Utility ..................................................................................... 17
Client Accounts: client Utility ....................................................................................................... 20
Client Limits, Permissions, and Interface Settings: client_pref Utility ......................................... 25
Client Templates: client_template Utility ..................................................................................... 33
ColdFusion Service on Plesk Server: cfsetting Utility ................................................................. 41
Custom Buttons: custombutton Utility ......................................................................................... 42
Database Servers: database-server Utility .................................................................................. 49
Databases: database Utility ......................................................................................................... 52
Desktop Presets: desktop Utility .................................................................................................. 57
DNS Zone Template: server_dns Utility ...................................................................................... 60
DNS Zones on Domains: dns Utility ............................................................................................ 66
Domain Accounts: domain Utility ................................................................................................. 73
Domain Administrator Accounts: domadmin Utility ..................................................................... 84
Domain Aliases: domalias Utility ................................................................................................. 91
Domain Limits and Preferences: domain_pref Utility .................................................................. 94
Domain Templates: domain_template Utility ............................................................................... 98
Interface and System Preferences: server_pref Utility .............................................................. 107
Interface Templates: interface_template Utility ......................................................................... 111
IP Addresses: ipmanage Utility ................................................................................................. 114
Mail Accounts: mail Utility .......................................................................................................... 117
Mail Autoresponders: autoresponder Utility .............................................................................. 123
Mail Server Settings: mailserver Utility ...................................................................................... 129
Mailing Lists: maillist Utility ........................................................................................................ 134
OS Update Sources: ai_prefs Utility .......................................................................................... 138
Plesk Services: service Utility .................................................................................................... 140
Server Configuration: init_conf Utility ........................................................................................ 143
Single Sign-On Configuration: sso Utility .................................................................................. 148
Site Applications: siteapp Utility ................................................................................................ 152
Site Application Items: siteapp-item Utility ................................................................................ 155
Site Application Licenses: siteapp-license Utility ...................................................................... 159
Site Directories Protection: protdir Utility ................................................................................... 161
Preface 4
Site Skeletons: skeleton Utility .................................................................................................. 165
Spam Filtering: spamassassin Utility ......................................................................................... 167
SSL Certificates: certificate Utility ............................................................................................. 171
Subdomains: subdomain Utility ................................................................................................. 175
Tomcat Service and Java Applications on Domains: tomcat Utility .......................................... 180
Web Statistics: webstat Utility ................................................................................................... 183
Web Users: webuser Utility ....................................................................................................... 185
Preface 5
In this section:
About This Guide ............................................................................................... 5
Who Should Read This Document .................................................................... 5
Typographical Conventions ............................................................................... 6
Feedback .......................................................................................................... 6
Preface
About This Guide
This document contains a complete description of command line utilities, commands, and options for Plesk for Linux/Unix.
Who Should Read This Document
This document is intended for Plesk administrators who want to manage the Plesk server and its configuration locally using command line utilities. The document can also be used by third-party developers to integrate Plesk with other products installed on the same server.
6 Preface
Typographical Conventions
Formatting convention
Type of Information
Example
Special Bold
Items you must select, such as menu options, command buttons, or items in a list.
Go to the QoS tab. Titles of chapters, sections, and subsections.
Read the Basic Administration chapter.
Italics
Used to emphasize the importance of a point, to introduce a term or to designate a command line placeholder, which is to be replaced with a real name or value.
The system supports the so called wildcard character search.
Monospace
The names of style sheet selectors, files and directories, and CSS fragments.
The license file is located in the httpdocs/common/license
directory.
Preformatted
On-screen computer output in your command-line sessions; source code in XML, C++, or other programming languages.
# ls –al /files
total 14470
Preformatted Bold
What you type, contrasted with on-screen computer output.
# cd /root/rpms/php
The following kinds of formatting in the text identify special information.
Feedback
If you have found a mistake in this guide, or if you have suggestions or ideas on how to improve this guide, please send your feedback using the online form at
http://www.parallels.com/en/support/usersdoc/. Please include in your report the guide's title,
chapter and section titles, and the fragment of text in which you have found an error.
This chapter describes the version-specific changes in the CL utilities. The changes are
C H A P T E R 1
History of Changes in CL Utilities
grouped by new features in CLI. To describe a particular change in CLI, we use the following notation:
(+) - the defined utility or command or option is added  (-) - the defined utility or command or option is deprecated  (*) - the defined utility or command or option is modified
Plesk 8.6 Added managing permission on selecting database server on which a database is to
be created.
(+) client_pref utility: -select_db_server option (+) client_template utility: -select-db-server option (+) domadmin utility: -select_db_server option
Plesk 8.4
Added support for DomainKeys spam protection used to sign outgoing email
messages and verify incoming email messages.
(+) domain_pref utility: -sign_outgoing_mail option (+) mailserver utility: --sign-outgoing-mail command (+) mailserver utility: --verify-incoming-mail command
Added managing Plesk user permission on creating DNS subzones in other users'
DNS superzones. (+) server_pref utility: -forbid-create-dns-subzone option
8 History of Changes in CL Utilities
Plesk 8.3
Added managing limit on maximum number of available connections.
(+) domain utility: -max-connections option
Added managing opportunity to publish sites with Sitebuilder.
(+) domain utility: -publish-sb-site option
Added managing limit on network use.
(+) domain utility: -traffic-bandwidth option
Dropped the <webuser_name>@<domain_name> format of access to Plesk
Control Panel.
 (-) domain_pref utility: -at-access option
Added managing the SSO service, which allows Plesk to participate in single sign-
on, and SSO branding in Plesk.
(+) sso utility
Modified managing site applications and site application licenses.
(-) siteapp utility: --add-to-vault command Use siteapp-item utility instead.
(-) siteapp utility: -release option
Use -sapp-release option instead.
(-) siteapp utility: -sapp option
Use -sapp-name option instead.
(-) siteapp utility: -version option
Use -sapp-version option instead.
(+) siteapp utility: -sapp-name option (+) siteapp utility: -sapp-release option (+) siteapp utility: -sapp-version option (+) siteapp-item utility (+) siteapp-license utility
Plesk Command Line Interface (CLI) is designed for integration of Plesk Server
Utility
Affected Object(s)
admin (on page 14)
Plesk administrator control panel interface preferences and personal information.
ai_prefs (on page 138)
Operating System update sources.
anonftp (on page 17)
Anonymous FTP access on domains with physical hosting on a Plesk server.
autoresponder (on page 123)
Mail autoresponders.
certificate (on page 171)
SSL certificates.
cfsetting (on page 41)
ColdFusion service on the Plesk server.
client (on page 20)
Client accounts.
client_pref (on page 25)
Client limits and permissions, IP pool, and Plesk interface preferences (for example, the default language and skin) for Plesk clients.
client_template (on page 33)
Client templates.
custombutton (on page 42)
Custom buttons.
database (on page 52)
Databases and database users.
database-server (on page 49)
Database servers.
C H A P T E R 2
Overview
Administrator with third-party applications. It can also be used for managing Plesk installations by administrators experienced in using Plesk. This feature provides the command line interface to the majority of management tasks that can be performed by Plesk administrator. The CLI provides the alternative means of control for various business objects in Plesk. Plesk command line utilities use the Plesk core functionality to create, manage, and delete clients, domains, services and other Plesk objects.
Plesk CL utilities may be used by the root user from the console or script. The utilities require "root" or "psaadm" privileges to operate.
Plesk CLI supports localized names of business objects in the same manner as Plesk does. Therefore, you can create clients with contact names using a locale of your choice. Use the LANG environment variable to set up a particular locale.
Plesk CLI does not require the Web interface of Plesk Server Administrator to run. Plesk CLI is commonly included in the Plesk distribution kit and is also available as the
separate plesk-api-cli package. The table below presents the command utilities provided by the current version of
Plesk (in alphabetical order).
10 Overview
Utility
Affected Object(s)
desktop (on page 57)
Desktop presets.
dns (on page 66)
DNS zones on domains and domain aliases.
domadmin (on page 84)
Domain administrator accounts.
domain (on page 73)
Domain accounts.
domain_pref (on page 94)
Domain limits and preferences for applications, scripting support, e-mail, and other services.
domain_template (on page 98)
Domain templates.
domalias (on page 91)
Domain aliases.
init_conf (on page 143)
Initial configuration of the Plesk server; Plesk administrator personal info.
interface_template (on page
111)
Control panel interface templates.
ipmanage (on page 114)
IP addresses on Plesk server.
mail (on page 117)
Domain-level mail service, and mail names (e-mail accounts).
maillist (on page 134)
Mailing lists.
mailserver (on page 129)
Server-wide mail server settings.
protdir (on page 161)
Password protection of Web directories on domains.
server_dns (on page 60)
Server-wide DNS zone template.
server_pref (on page 107)
Plesk default interface preferences, and Plesk server system preferences.
service (on page 140)
Services on the Plesk server.
siteapp (on page 152)
Site application packages.
siteapp-item (on page 155)
Site application items.
siteapp-license (on page
159)
Site application licenses.
skeleton (on page 165)
Site skeletons (directory structure).
spamassassin (on page 167)
Spamassassin spam filter.
sso (on page 148)
Single sign-on configuration.
subdomain (on page 175)
Subdomains.
tomcat (on page 180)
Tomcat service and the Java-based Web applications on domains.
webstat (on page 183)
Webalizer preferences.
webuser (on page 185)
Web users on domains.
The Plesk for Linux/Unix command line utilities must be run from the directory in which they are stored. For general instructions on executing command line utilities on Plesk server, consult the Getting Started with Command-Line Utilities (on page 11) section.
Command line utilities for Plesk for Linux/Unix are located in the
C H A P T E R 3
Getting Started with Command Line Utilities
/usr/local/psa/bin directory on the Plesk server.
To run command line utilities:
1 Log in to the Plesk server via SSH. 2 Use one of the following options to run a utility:
To run a utility from any directory, use the following command line format:
# /usr/local/psa/bin/<utility name> [parameters] [options]
To run a utility when the /usr/local/psa/bin/ is your current directory, use
the following format:
# ./<utility name> [parameters] [options]
Upon successful execution, utilities return the 0 code. If an error occurs, utilities return code 1 and display the description of the encountered problem on stderr.
For exact command syntax for each utility, consult the corresponding sections in the Chapter "Using Command Line Utilities (on page 12)".
Warning: Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the arguments of the -passwd - -passwd_type options. Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the arguments of the -passwd and -passwd_type options.
Plesk for Linux/Unix command line utilities enable Plesk administrators to manage the
C H A P T E R 4
Using Command Line Utilities
Plesk server and its configuration, client accounts, domains, and various services. The utilities can be used for integration of third-party products with Plesk and for routine management of Plesk servers by system administrators.
This chapter describes in detail the commands and options currently available for the command-line utilities. Each command and option is accompanied by a description and a usage example.
Using Command Line Utilities 13
In this chapter:
Administrator's Server Preferences: admin Utility .............................................. 14
Anonymous FTP Access: anonftp Utility ............................................................ 17
Client Accounts: client Utility ............................................................................. 20
Client Limits, Permissions, and Interface Settings: client_pref Utility ................. 25
Client Templates: client_template Utility ............................................................ 33
ColdFusion Service on Plesk Server: cfsetting Utility ......................................... 41
Custom Buttons: custombutton Utility ................................................................ 42
Database Servers: database-server Utility ........................................................ 49
Databases: database Utility ............................................................................... 52
Desktop Presets: desktop Utility ........................................................................ 57
DNS Zone Template: server_dns Utility ............................................................. 60
DNS Zones on Domains: dns Utility .................................................................. 66
Domain Accounts: domain Utility ....................................................................... 73
Domain Administrator Accounts: domadmin Utility ............................................ 84
Domain Aliases: domalias Utility ........................................................................ 91
Domain Limits and Preferences: domain_pref Utility ......................................... 94
Domain Templates: domain_template Utility...................................................... 98
Interface and System Preferences: server_pref Utility ....................................... 107
Interface Templates: interface_template Utility .................................................. 111
IP Addresses: ipmanage Utility .......................................................................... 114
Mail Accounts: mail Utility .................................................................................. 117
Mail Autoresponders: autoresponder Utility ....................................................... 123
Mail Server Settings: mailserver Utility .............................................................. 129
Mailing Lists: maillist Utility ................................................................................ 134
OS Update Sources: ai_prefs Utility .................................................................. 138
Plesk Services: service Utility ............................................................................ 140
Server Configuration: init_conf Utility ................................................................. 143
Single Sign-On Configuration: sso Utility ........................................................... 148
Site Applications: siteapp Utility ......................................................................... 152
Site Application Items: siteapp-item Utility ......................................................... 155
Site Application Licenses: siteapp-license Utility ............................................... 159
Site Directories Protection: protdir Utility ........................................................... 161
Site Skeletons: skeleton Utility .......................................................................... 165
Spam Filtering: spamassassin Utility ................................................................. 167
SSL Certificates: certificate Utility ...................................................................... 171
Subdomains: subdomain Utility ......................................................................... 175
Tomcat Service and Java Applications on Domains: tomcat Utility .................... 180
Web Statistics: webstat Utility ............................................................................ 183
Web Users: webuser Utility ............................................................................... 185
14 Using Command Line Utilities
Administrator's Server Preferences:
Command
Parameter
Description
Example
-update or -u
Updates Plesk administrator's server preferences.
To set the WinXP Olivegreen skin as the default interface skin:
# ./admin --update -skin "WinXP Olivegreen"
or
# ./admin -u -skin "WinXP Olivegreen"
--info or
-i
Displays Plesk
administrator’s
personal information and preferences.
To view Plesk administrator’s personal information
and preferences:
# ./admin --info
or
# ./admin -i
--xml-
info or -
xi
Displays Plesk
administrator’s
personal information and preferences in the XML format.
To view Plesk administrator’s personal information
and preferences in the XML format:
# ./admin --xml-info
or
# ./admin -xi
admin Utility
The admin utility is used to manage Plesk administrator control panel interface preferences and view the administrator's personal information and interface preferences through CLI.
Usage
admin <command> [ <option_1> [<param>] [<option_2> [<param>]] … [<option_N> [<param>]]
Example The following command sets the default interface skin to WinXP Olivegreen, the default
interface language to Russian, and applies interface customization template CustomTemplate to the administrator's control panel interface.
# ./admin --update -skin "WinXP Olivegreen" -locale -ru-RU -template CustomTemplate
Commands
Using Command Line Utilities 15
Command
Parameter
Description
Example
--help or
-h
Displays help on the use of the utility.
To view help on the use of the admin utility:
# ./admin --help
or
# ./admin -h
Option
Parameter
Description
Example
-locale
<language_code>
Sets the default interface language for Plesk administrator's control panel interface.
The argument of the command must be a valid four-letter language code derived from the language code described in ISO-639-2 and the corresponding country code described in ISO-3166.
For example, the Plesk code for the Italian language code is it-IT; the Plesk code for the American variant of English is en-US; the Plesk code for the British variant of English is en-GB.
To set the default interface language to Russian:
# ./admin -u -locale ru-RU
-skin
<skin_name>
Sets the default interface skin for Plesk administrator's control panel interface.
To set the default interface skin to WinXP Olivegreen:
# ./admin -u -skin "WinXP Olivegreen"
­template
<template_name>
Applies an interface customization template to Plesk administrator's control panel interface.
To apply the customization template CustomTemplate to administrator's control panel interface:
# ./admin -u ­template CustomTemplate
­multiple
­sessions
true|false
Allows/Prohibits having several simultaneous sessions under administrator's login.
To allow multiple sessions to run simultaneously under administrator's login:
# ./admin -u ­multiple-sessions true
Options
16 Using Command Line Utilities
Option
Parameter
Description
Example
-max­button­length
<number>
Limits button label length for the Plesk administrator's control panel interface.
To restrict the maximum button label length for the Plesk administrator's control panel interface to 10:
# ./admin -u -max­button-length 10
-lock­screen
true|false
Prevents/Allows working with Plesk until page is completely loaded.
To allow Plesk administrator to work with the control panel even if control panel screens are not completely loaded:
# ./admin -u -lock­screen false
Using Command Line Utilities 17
Anonymous FTP Access: anonftp Utility
Command
Parameter
Description
Example
--update or -u
<domain_ name>
Updates the anonymous FTP settings on a specified domain.
To enable downloading files from the incoming directory by users on the domain example.com:
# ./anonftp --update example.com ­status true -incoming-downloads true
or
# ./anonftp -u example.com -status true -incoming-downloads true
--info or
-i
<domain_ name>
Displays information about the anonymous FTP settings on a specified domain.
To view information about anonymous FTP settings on the domain example.com:
# ./anonftp --info example.com
or
# ./anonftp -i example.com
The anonftp utility is used to manage anonymous FTP access on domains with physical hosting on a Plesk server. By using this utility, you can perform the following tasks:
enabling/disabling the anonymous FTP access on a domain restricting download bandwidth and the maximum number of simultaneous FTP
connections
managing the incoming directory properties configuring welcome message displayed upon anonymous FTP user login
Usage
anonftp <command> <domain_name> [ <option_1> [<param>] [<option_2> [<param>]] … [<option_N> [<param>]] ]
Example The following command enables the anonymous FTP service on the domain
example.com and enables displaying the login message with the text "Welcome to FTP service" upon the anonymous FTP user login.
# ./anonftp --update example.com -status true -message true -message­text "Welcome to FTP service"
Commands
18 Using Command Line Utilities
Command
Parameter
Description
Example
--help or
-h
Displays help on the use of the utility.
To view help on the use of the anonftp utility:
# ./anonftp --help
or
# ./anonftp -h
Option
Parameter
Description
Example
-status
true|fals e
Enables/Disables the anonymous FTP service on a domain.
To enable the anonymous FTP service on the domain example.com:
# ./anonftp -u example.com ­status true
-message
true|fals e
Enables/Disables displaying a login message upon anonymous FTP user login.
To enable displaying a login message upon the anonymous FTP user login on the domain example.com:
# ./anonftp -u example.com ­status true
­message­text
<string>
Specifies a login message text.
To display the 'Welcome to FTP service' login message when logging to the anonymous FTP service on the domain example.com:
# ./anonftp -u example.com ­status true -message true ­message-text "Welcome to FTP service"
­incoming
true|fals e
Enables/Disables uploading to the incoming directory.
Is false by default.
To enable uploading files to the incoming directory on the domain example.com:
# ./anonftp -u example.com ­status true -incoming true
­incoming
-dirs
true|fals e
Allows/Prohibit creating directories in the incoming directory.
To allow creating directories in the incoming directory on the domain example.com:
# ./anonftp -u example.com ­status true -incoming-dirs true
­incoming
­download s
true|fals e
Enables/Disables downloading from the incoming directory.
Is false by default.
To enable downloading files from the incoming directory on the domain example.com:
# ./anonftp -u example.com ­status true -incoming­downloads true
Options
Using Command Line Utilities 19
Option
Parameter
Description
Example
­incoming
-limit
<number>[ K|M|G]
Limits the disk space used by the incoming directory.
Unlimited if set to -1. A number without a letter
is interpreted as the number of bytes.
To restrict the disk space for the incoming directory on the domain example.com to 10 MB:
# ./anonftp -u example.com ­status true -incoming-limit 10M
-max­connects
<number>
Limits the number of available simultaneous FTP connections.
Unlimited if set to -1.
To restrict the maximum number of simultaneous FTP connections to 40:
# ./anonftp -u example.com ­status true -max-connects 40
­bandwidt h
<number>[ K|M|G]
Restricts the download bandwidth.
Unlimited if set to -1. A number without a letter
is interpreted as the number of bytes.
To restrict the download bandwidth to 500 KB:
# ./anonftp -u example.com ­status true -bandwidth 500K
20 Using Command Line Utilities
Client Accounts: client Utility
Command
Parameter
Description
Example
--create or -c
<login_name>
Creates a new client account.
The argument of the command must begin with an alphabetic symbol.
To create a client account named John Doe with client login name JDoe and password sample:
# ./client --create JDoe -name "John Doe" -passwd sample
or
# ./client -c JDoe -name "John Doe" -passwd sample
--update or -u
<login_name>
Updates settings of an existing client account.
To change client login name to John and set password to mypass for the client with current login name JDoe :
# ./client --update JDoe -login John -passwd mypass
or
# ./client -u JDoe -login John ­passwd mypass
The client utility is used to manage Plesk client accounts through CLI. By using this utility, you can perform the following tasks:
creating, renaming, and removing client accounts enabling and disabling existing client accounts edit client's login name and password edit client's personal information
Usage
client <command> <client_login_name> [ <option_1> [<param>] [<option_2> [<param>]] … [<option_N> [<param>]]
Example The following command creates the client account with the contact name John Doe,
Plesk control panel login name JDoe, and password sample, specifies the Unites States as the client’s country, and prevents automatic sending of standard Plesk mail notifications (if they are enabled) about the account creation.
# ./client --create JDoe -name "John Doe" -passwd sample -country US ­notify false
Commands
Using Command Line Utilities 21
Command
Parameter
Description
Example
--remove or -r
<login_name>
Deletes a client account.
To remove the client account with the login name JDoe:
# ./client --remove JDoe
or
# ./client -r JDoe
--info or
-i
<login_name>
Displays information about client account settings.
To view information about the client account with the login name John:
# ./client --info John
or
# ./client -i John
--on
<login_name>
Enables a client account.
To enable the client account with the login name John:
# ./client --on John
--off
<login_name>
Disables a client account.
To disable the client account with the login name John:
# ./client --off John
--help or
-h
Displays help on the use of the utility.
To view help on the client utility:
# ./client --help
or
# ./client -h
Option
Parameter
Description
Example
-status
enabled|di sabled|adm in,expired
Enables/Disables a client account (the enabled or disabled parameters, respectively).
Disables a client account and sets the account status to "Account is disabled by administrator" (admin), or "Account is expired" (expired).
Is enabled by default.
To disable the client account with the login name JDoe and assign status
"Account is disabled by administrator" to the account:
# ./client -u JDoe -status admin
-company
<string>
Specifies client's company name.
To set the company name in the personal info of the client with the login name John to MegaCompany Inc.:
# ./client -u John -company "MegaCompany Inc."
Options
22 Using Command Line Utilities
Option
Parameter
Description
Example
-name
<string>
Specifies client's contact name.
Required with -­create.
To create the John Doe client account with the client login name JDoe and password sample:
# ./client -c JDoe -name "John Doe" -passwd sample
-login
<client_lo gin_name>
Specifies client's login name used to entering Plesk control panel.
Used with --update only.
To set client login name to John for the client account with current login name JDoe:
# ./client -u JDoe -login John
-passwd
<password>
Specifies client's password used to entering Plesk control panel.
Required with -­create.
Required with ­passwd_type option.
For additional comments, see the Note below.
To create the John Doe client account with the login name JDoe and password sample:
# ./client -c JDoe -name "John Doe" -passwd sample
­passwd_typ e
plain|encr ypted
Specifies the type of client password.
Requires -passwd option.
Is plain by default. For additional
comments, see the Note below.
To set the type of the password for the client account with the login name JDoe and password sample to encrypted:
# ./client -u JDoe ­passwd_type encrypted ­passwd sample
-phone
<number>
Specifies client's phone number.
To set the phone number for the client with the login name JDoe to 5552345:
# ./client -u JDoe -phone 5552345
-fax
<number>
Specifies client's fax number.
To set the fax number for the client with the login name JDoe to 5552337:
# ./client -u JDoe -fax 5552337
-email
<string>
Specifies client's email address.
To set the email address for the client with login name JDoe to JDoe@example.com:
# ./client -u JDoe -email JDoe@example.com
Using Command Line Utilities 23
Option
Parameter
Description
Example
-addr
<string>
Specifies client's postal address.
Deprecated since Plesk
8.1. Use the -address option instead.
To set the postal address for the client with the login name JDoe to 8 Main street:
# ./client -u JDoe -addr "8 Main street"
-address
<string>
Specifies client's postal address.
To set the postal address for the client with the login name JDoe to 8 Main street:
# ./client -u JDoe -address "8 Main street"
-city
<string>
Specifies client's city.
To set the city address for the client with login name JDoe to New York:
# ./client -u JDoe -city "New York"
-state
<string>
Specifies client's state/province.
To set the state for the client with login name JDoe to NY:
# ./client -u JDoe -state NY
-pcode
<string>
Specifies client's zip/postal code.
Deprecated since Plesk
8.1. Use the -zip option instead.
To set the postal code for the client with login name JDoe to 52345:
# ./client -u JDoe -pcode 52345
-zip
<string>
Specifies client's zip/postal code.
To set the postal code for the client with login name JDoe to 52345:
# ./client -u JDoe -zip 52345
-country
<country_c ode>
Specifies client's country: a two-letters upper-case code in compliance with ISO
3166.
To set the country for the client with login name JDoe to United States:
# ./client -u JDoe -country US
-notify
true|false
Allows/Prevents standard email notifications on client account creation.
Used with the -­create only.
To prevent sending standard email notifications on creation of John Doe client account with the login name JDoe and password sample:
# ./client -c JDoe -name "John Doe" -passwd sample ­notify false
-template
<template_ name>
Specifies a client template to be used for a client creation.
Used with the -­create only.
To specify the template Client Template to create the John Doe client account with the login name JDoe and password sample:
# ./client -c JDoe -name "John Doe" -passwd sample ­template "Client Template"
24 Using Command Line Utilities
Option
Parameter
Description
Example
-force
Forces the use of a client template to create a client account even if some of the template options cannot be implemented.
Used only with the -­create command.
To force the use of the template
Client Template to create the John Doe client account with the login name JDoe and password sample:
# ./client -c JDoe -name "John Doe" -passwd sample ­template "Client Template"
-force
-creation­date
<YYYY-MM­DD>
Sets the client account creation date (can be arbitrary).
Used only with the -­create command.
To set the creation date for the new John Doe client account with the login name JDoe and password sample to 2006-12-30:
# ./client -c JDoe -name "John Doe" -passwd sample ­creation-date 2006-12-30
Note: Use of this option is not recommended. Passing passwords through CLI as parameters of the -passwd option may potentially compromise the system's security as command line can be observed by other users of the system. It is more secure to pass passwords through the environment variables. You can transfer non-encrypted passwords by using environment variable PSA_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd - ­passwd_type options. Similarly, you can transfer encrypted passwords through the environment variable PSA_CRYPTED_PASSWORD while using single quotes to specify the empty values in the command line for the argument of the -passwd and -passwd_type options.
Using Command Line Utilities 25
Client Limits, Permissions, and Interface
Command
Parameter
Description
Example
--update or
-u
<login_nam
e>
Updates preferences and limits for an existing client account.
To disable changing domain limits for the client account with the login name JDoe:
# ./client_pref --update JDoe ­change_limits false
or
# ./client_pref -u JDoe ­change_limits false
--skin-
list or -sl
Displays the list of available control panel interface skins.
To view the list of available interface skins:
# ./client_pref --skin-list
or
# ./client_pref -sl
--info or -i
<login_nam
e>
Displays information about client account preferences and limits.
To view information about preferences and limits set on the client account with login name JDoe:
# ./client_pref --info JDoe
or
# ./client_pref -i JDoe
Settings: client_pref Utility
The client_pref utility enables the administrator to set and edit the client's limits and permissions, to manage the client's IP pool, and to define Plesk interface preferences (e.g. the default language and skin) for the client through CLI.
Usage
client_pref <command> <client_login_name> [ <option_1> [<param>] [<option_2> [<param>]] … [<option_N> [<param>]]
Example The following command updates the client account with the login name JDoe as
follows: the client is allowed to manage log rotation and mailing lists and to create up to 20 subdomains. The use of disk space allotted for the client is restricted to 20 GB, and the expiration date of the client account is set to 2008-12-31.
# ./client_pref --update JDoe -manage_log true -manage_maillists true
-max_subdom 20 -disk_space 20G -expiration 2008-12-31
Commands
26 Using Command Line Utilities
Command
Parameter
Description
Example
--help or -h
Displays help on the use of the utility.
To view help on the use of the client_pref utility:
# ./client_pref --help
or
# ./client_pref -h
Option
Parameter
Description
Example
­create_domain s
true|fal se
Allows/Prohibits creation domains.
Is false by default.
To allow the client with the login name JDoe to create domains:
# ./client_pref -u JDoe ­create_domains true
­manage_phosti ng
true|fal se
Allows/Prohibits managing physical hosting.
Is false by default.
To allow the client with the login name JDoe to manage physical hosting:
# ./client_pref -u JDoe ­manage_phosting true
­manage_php_sa fe_mode
true|fal se
Allows/Prohibits managing PHP safe mode.
Is false by default.
Available since Plesk
8.1.1.
To allow the client with login name JDoe to manage PHP safe mode:
# ./client_pref -u JDoe ­manage_php_safe_mode true
­change_limits
true|fal se
Allows/Prohibits changing domain limits.
Is false by default.
To allow the client with the login name JDoe to change domain limits:
# ./client_pref -u JDoe ­change_limits true
-manage_dns
true|fal se
Allows/Prohibits managing DNS.
Is false by default.
To allow the client with the login name JDoe to manage DNS:
# ./client_pref -u JDoe ­manage_dns true
-manage_log
true|fal se
Allows/Prohibits managing log rotation.
Is false by default.
To allow the client with the login name JDoe to manage log rotation:
# ./client_pref -u JDoe ­manage_log true
­manage_cronta b
true|fal se
Allows/Prohibits managing task scheduler.
Is false by default.
To allow the client with the login name JDoe to manage task scheduler:
# ./client_pref -u JDoe ­manage_crontab true
Options
Using Command Line Utilities 27
Option
Parameter
Description
Example
­manage_anonft p
true|fal se
Allows/Prohibits managing anonymous FTP.
Is false by default.
To allow the client with the login name JDoe to manage anonymous FTP:
# ./client_pref -u JDoe ­manage_anonftp true
­manage_webapp s
true|fal se
Allows/Prohibits managing Java applications.
Is false by default.
To allow the client with the login name JDoe to manage Java applications:
# ./client_pref -u JDoe ­manage_webapps true
­manage_mailli sts
true|fal se
Allows/Prohibits managing mailing lists.
Is false by default.
To allow the client with the login name JDoe to manage mailing lists:
# ./client_pref -u JDoe ­manage_maillists true
­manage_sh_acc ess
true|fal se
Allows/Prohibits managing system access.
Is false by default.
To allow the client with the login name JDoe to manage system access:
# ./client_pref -u JDoe ­manage_sh_access true
­manage_not_ch root_shell
true|fal se
Allows/Prohibits managing non-chrooted environment.
Is false by default.
To allow the client with the login name JDoe to manage non­chrooted environment:
# ./client_pref -u JDoe ­manage_not_chroot_shell true
­manage_subdom ains
true|fal se
Allows/Prohibits managing subdomains.
Is false by default.
To allow the client with the login name JDoe to manage subdomains:
# ./client_pref -u JDoe ­manage_subdomains true
-manage_quota
true|fal se
Allows/Prohibits managing hard disk quota.
Is false by default.
To allow the client with login name JDoe to manage hard disk quota:
# ./client_pref -u JDoe ­manage_quota true
-make_dumps
true|fal se
Allows/Prohibits backing up and restoring data.
Deprecated. Is false by default.
To allow the client with the login name JDoe to backup and restore data:
# ./client_pref -u JDoe ­make_dumps true
­allow_local_b ackups
true|fal se
Allows/Prohibits backing up and restoring data using the Plesk repository.
Is false by default.
To allow the client with the login name JDoe to backup and restore data using the Plesk repository:
# ./client_pref -u JDoe ­allow_local_backups true
28 Using Command Line Utilities
Option
Parameter
Description
Example
­allow_ftp_bac kups
true|fal se
Allows/Prohibits backing up and restoring data using the FTP repository.
Is false by default.
To allow the client with the login name JDoe to backup and restore data using the FTP repository:
# ./client_pref -u JDoe ­allow_ftp_backups true
-manage_drweb
true|fal se
Allows/Prohibits managing Dr.Web antivirus application used on client's domains.
Deprecated since Plesk
8.1.1. Use the ­manage_virusfilter option instead.
To allow the client with the login name JDoe to manage the Dr.Web antivirus application:
# ./client_pref -u JDoe ­manage_drweb true
­manage_virusf ilter
true|fal se
Allows/Prohibits managing antivirus tool used on client's domains.
Is false by default.
To allow the client with the login name JDoe to manage antivirus tool:
# ./client_pref -u JDoe ­manage_virusfilter true
­remote_access _interface
true|fal se
Allows/Prohibits using Plesk API.
Is false by default.
To allow the client with the login name JDoe to use Plesk API:
# ./client_pref -u JDoe ­remote_access_interface true
­manage_domain _aliases
true|fal se
Allows/Prohibits managing domain aliases.
Is false by default.
To allow the client with the login name JDoe to manage domain aliases:
# ./client_pref -u JDoe ­manage_domain_aliases true
-cp_access
true|fal se
Allows/Prohibits accessing Plesk GUI (as opposite to using Plesk API).
Is true by default.
To prohibit the client with login name JDoe from accessing Plesk GUI:
# ./client_pref -u JDoe ­cp_access false
­manage_dashbo ard
true|fal se
Allows/Prohibits managing desktop view.
Can be set to true only if the -dashboard option is set to true.
Is true by default.
To prohibit the client with login name JDoe from managing desktop view:
# ./client_pref -u JDoe ­manage_dashboard true
-stdgui
true|fal se
Allows/Prohibits using standard view.
Can be set to false only if the -dashboard option is set to true.
Is true by default.
To prohibit the client with the login name JDoe from using standard view:
# ./client_pref -u JDoe ­stdgui false
Using Command Line Utilities 29
Option
Parameter
Description
Example
­manage_spamfi lter
true|fal se
Allows/Prohibits managing spam filter.
Is false by default.
To allow the client with the login name JDoe to manage spam filter:
# ./client_pref -u JDoe ­manage_spamfilter true
­manage_websta t
true|fal se
Allows/Prohibits managing web statistics.
Is false by default.
Available since Plesk
8.2.
To allow the client with the login name JDoe to manage web statistics:
# ./client_pref -u JDoe ­manage_webstat true
-max_dom
<number>
Limits the number of available domains.
Unlimited if set to-1.
To restrict maximum number of domains available to the client with the login name JDoe to 10:
# ./client_pref -u JDoe ­max_dom 10
­max_dom_alias es
<number>
Limits the number of available domain aliases.
Unlimited if set to -1.
To restrict the maximum number of domain aliases available to the client with the login name JDoe to 5:
# ./client_pref -u JDoe ­max_dom_aliases 5
-disk_space
<number> [K|M|G]
Limits the amount of available disk space.
A number without a letter is interpreted as the number of bytes.
Unlimited if set to -1.
To restrict the maximum amount of disk space available to the client with the login name JDoe to 100 MB:
# ./client_pref -u JDoe ­disk_space 100M
-max_traffic
<number> [K|M|G]
Limits the monthly traffic usage.
A number without a letter is interpreted as the number of bytes.
Unlimited if set to -1.
To restrict the maximum amount of traffic available to the client with the login name JDoe to 10 GB/month:
# ./client_pref -u JDoe ­max_traffic 10G
-max_box
<number>
Limits the number of available mailboxes.
Unlimited if set to -1.
To restrict the maximum number of mailboxes available to the client with the login name JDoe to 100:
# ./client_pref -u JDoe ­max_box 100
-mbox_quota
<number> [K|M|G]
Limits the amount of disk space that a single mailbox can occupy.
A number without a letter is interpreted as the number of bytes.
Unlimited if set to -1.
To set the mailbox quota for the client with login name JDoe to 10 MB:
# ./client_pref -u JDoe ­mbox_quota 10M
30 Using Command Line Utilities
Option
Parameter
Description
Example
-max_redir
<number>
Limits the number of available mail redirects.
Unlimited if set to -1.
To restrict the maximum number of mail redirects available to the client with the login name JDoe to 10:
# ./client_pref -u JDoe ­max_redir 10
-max_mg
<number>
Limits the number of available mail groups.
Unlimited if set to -1.
To set the number of mail groups available to the client with the login name JDoe to unlimited:
# ./client_pref -u JDoe ­max_mg -1
-max_resp
<number>
Limits the number of available mail autoresponders.
Unlimited if set to -1.
To restrict the maximum number of mail autoresponders available to the client with the login name JDoe to 5:
# ./client_pref -u JDoe ­max_resp 5
-max_wu
<number>
Limits the number of available web users.
Unlimited if set to -1.
To restrict the maximum number of web users available to the client with the login name JDoe to 50:
# ./client_pref -u JDoe ­max_wu 50
­max_maillists
<number>
Limits the number of available mailing lists.
Unlimited if set to -1.
To restrict the maximum number of mailing lists available to the client with the login name JDoe to 30:
# ./client_pref -u JDoe ­max_maillists 30
-max_db
<number>
Limits the number of available databases.
Unlimited if set to -1.
To restrict the maximum number of databases available to the client with the login name JDoe to 20:
# ./client_pref -u JDoe ­max_db 2
-max_webapps
<number>
Limits the number of available Java applications.
Unlimited if set to -1.
To restrict the maximum number of Java applications available to the client with the login name JDoe to 50:
# ./client_pref -u JDoe ­max_webapps 50
-max_subdom
<number>
Limits the number of available subdomains.
Unlimited if set to -1.
To restrict the maximum number of subdomains available to the client with the login name JDoe to 40:
# ./client_pref -u JDoe ­max_subdom 40
-expiration
<YYYY­MM-DD>
Limits the validity period of a client account.
Unlimited if set to -1.
To set the validity period of the client account with the login name JDoe to February 29, 2008:
# ./client_pref -u JDoe ­expiration 2008-2-29
Loading...
+ 158 hidden pages