Anonymous FTP Access: anonftp Utility

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:

Syntax

anonftp <command> <domain name> [

<option_1> [<param>]

[<option_2> [<param>]]

…[<option_N> [<param>]]

]

Example

The following command line enables the anonymous FTP service on domain example.com and enables display of a login message with 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

Command

Parameter

Description

Example

--update or -u

<domain name>

Updates the anonymous FTP settings on the specified domain.

To enable downloading files from the incoming directory by users:

# ./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 the specified domain.

To display information about anonymous FTP settings on domain example.com:

# ./anonftp --info example.com

or

# ./anonftp -i example.com

--help or -h

 

Displays help on the use of the utility.

To display help on the use of the anonftp utility:

# ./anonftp --help

or

# ./anonftp -h

Options

Option

Parameter

Description

Example

-status

true | false

Enables or disables the anonymous FTP service on a domain.

To enable the anonymous FTP service on domain example.com:

# ./anonftp -u example.com -status true

-message

true | false

Enables or disables display of a login message upon anonymous FTP user login (the Display login message parameter).

To enable display of a login message upon the anonymous FTP user login on domain example.com:

# ./anonftp -u -status true

-message-text

<string>

Message text displayed upon the anonymous FTP user login.

To display welcome message Welcome to FTP service upon anonymous FTP user login on domain example.com:

# ./anonftp -u example.com -status true -message true -message-text "Welcome to FTP service"

-incoming

true | false

Enables or disables uploading to the incoming directory (the Allow uploading to incoming directory parameter).

Set to false by default.

To allow uploading files to the incoming directory by users:

# ./anonftp -u example.com -status true -incoming true

-incoming-dirs

true | false

Enables or disables creation of directories in the incoming directory (the Allow creation of directories in the incoming directory parameter).

To enable creation of directories in the incoming directory:

# ./anonftp -u example.com -status true -incoming-dirs true

-incoming-downloads

true | false

Enables or disables downloading from the incoming directory (the Allow downloading from the incoming directory parameter).

Set to false by default.

To enable downloading files from the incoming directory by users:

# ./anonftp -u example.com -status true -incoming-downloads true

-incoming-limit

<KB>

Sets disk space allocation for the incoming directory (the Limit disk space in the incoming directory parameter).

Type "-1" to set the parameter to Unlimited.

To limit disk space in the incoming directory to 900 Kb:

# ./anonftp -u example.com -status true -incoming-limit 900

-max-connects

<number>

Sets the maximum number of simultaneous FTP connections (the Limit number of simultaneous connections parameter).

Type "-1" to set the parameter to Unlimited.

To set the maximum number of simultaneous FTP connections to 4:

# ./anonftp -u example.com -status true -max-connects 4

-bandwidth

<KB>

Sets the maximum download bandwidth (the Limit download bandwidth for this virtual FTP domain parameter).

Type "-1" to set the parameter to Unlimited.

To limit the maximum download bandwidth to 50 Kb:

# ./anonftp -u example.com -status true -bandwidth 50