PLESK COMMAND LINE INTERFACE

Section 3.2.6 Managing Web-Protected Directories

3.2.6.1 Purpose

The protdir.sh utility allows managing web protection for domain directories. Also, it controls logins/passwords for accessing protected directories.

3.2.6.2 Usage

Usage: protdir.sh command [options]

Available commands and options:

Command Parameter Action
--create or -c <dir_name> creates a protected directory
--update or -u <dir_name> updates a protected directory: renames the directory, edits the directory title, manages users
--remove or -r <dir_name> deletes a protected directory
--help or -h   displays help on the utility usage
Option Parameter Note
-domain <domain_name> a domain name (required)
-title <string> a directory header text
-type <http|https|both> the type of directory access
-passwd <password> sets a user password
-passwd_type <plain|crypt> the password type (default: plain)
-add_user <login_name> adds a user with the specified name
-update_user <login_name> updates a user with the specified name
-remove_user <login_name> removes a user with the specified name
-user_name <login_name> sets a login name (may be set/specified with the "update_user" option)
-dir_name <dir_name> sets the protected directory name (may be set/specified with the "update_user" option)

3.2.6.3 Examples

Putting "administrator" directory under protection:
./protdir.sh --create "administrator" -domain "domain.zone" -type http -add_user "administrator" -passwd "password"

to top