protdir.exe: Protection on Site Directories
The protdir.exe utility serves to manage web protection for domain
directories, or, in other words, site areas. The utility allows the
following operations:
creating, renaming, and removing protected web directories
adding and removing users allowed to access protected web directories
changing the credentials of the users allowed to access protected web directories
Location
%plesk_cli%
Usage
protdir.exe <command> [<dir_name>] [
<option 1> <param> [<option 2> <param>] ... [<option N> <param>]
]
Example
The following command creates the ProtectedDir protected directory
on domain example.com, adds the JohnDoe user for this directory, and
sets the MyPass password for this user.
plesk bin protdir.exe --create ProtectedDir -domain example.com -add_user JohnDoe -passwd MyPass
Commands
Command |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Creates the protected URL on the specified domain. Requires |
To create the protected URL ProtectedDir on example.com: plesk bin protdir.exe --create ProtectedDir -domain example.com or plesk bin protdir.exe -c ProtectedDir -domain example.com |
|
|
Updates the protected URL. Is meant to change URL and manage its users. Requires |
To update ProtectedDir by assigning it a title to be displayed on the dialog box: plesk bin protdir.exe --update ProtectedDir -domain example.com -title "Welcome to ProtectedDir" or plesk bin protdir.exe -u Protected_Dir -domain example.com -title "Welcome to ProtectedDir |
|
|
Removes password protection from an URL. Requires |
To remove password protection from the URL ProtectedDir from example.com: plesk bin protdir.exe --remove ProtectedDir -domain example.com or plesk bin protdir.exe -r ProtectedDir -domain example.com |
|
Displays help on the use of the utility. |
To see the help info on the use of this utility: plesk bin protdir.exe --help or plesk bin protdir.exe -h |
Options
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Specifies the domain name that owns the URL. Required for all commands, except for |
To create the protected URL ProtectedDir on example.com: plesk bin protdir.exe --create ProtectedDir -domain example.com |
|
|
Specifies the subdomain name that owns the URL. |
To create the protected URL ProtectedDir on photo.example.com: plesk bin protdir.exe --create ProtectedDir -domain example.com -subdomain photo |
|
|
Specifies the realm of the protected URL, i.e. the description that will be displayed in the authorization window. |
To create a realm for the protected URL ProtectedDir on example.com: plesk bin protdir.exe --update ProtectedDir -domain example.com -title "Welcome to protected directory" |
|
|
Specifies the protected URL user password. |
To set a password for the ProtectedDir user with the login name JohnDoe to MyPass: plesk bin protdir.exe --update ProtectedDir -domain example.com -update_user JohnDoe -passwd MyPass |
|
|
Adds the protected URL user. |
To add ProtectedDir user with the login name JohnDoe and the password MyPass on example.com: plesk bin protdir.exe --update ProtectedDir -add_user JohnDoe -domain example.com -passwd MyPass |
|
|
Updates the protected URL user. |
To change the ProtectedDir user’s login name from JohnDoe to John on example.com: plesk bin protdir.exe --update ProtectedDir -update_user JohnDoe -user_name John -domain example.com |
|
|
Removes protected URL user. |
To remove the ProtectedDir user with the login name JohnDoe on the domain example.com: plesk bin protdir.exe --update ProtectedDir -remove_user JohnDoe -domain example.com |
|
|
Sets the login name for a protected URL user. Can be used in combination with the |
To change the ProtectedDir user’s login name from JohnDoe to John on the domain example.com: plesk bin protdir.exe --update ProtectedDir -update_user JohnDoe -user_name John -domain example.com |
|
|
Sets the name of the protected URL. |
To rename the protected URL from ProtectedDir to ProtectedPhoto on the domain example.com: plesk bin protdir.exe --update ProtectedDir -dir_name ProtectedPhoto -domain example.com |
|
|
Sets the password type. |
To set the type of password to plain for the protected URL ProtectedDir on example.com: plesk bin protdir.exe --update ProtectedDir -domain example.com -passwd_type plain |