The ftp service provides access control using the .ftpaccess file. This file is created in the directory whose access you want to change. The effect of the directives in the .ftpacces file extends to the directory in which it is located, and to all nested directories and files.
In general, the .ftpaccess structure consists of one or more Limit sections and looks like this:
<Limit parameter>
...
list of directives...
</Limit>Parameters in this case can be ALL, DIRS, LOGIN, READ, WRITE, or individual ftp commands.
Directives:
Setting up access using Limit
To deny all users access via ftp, specify the following in .ftpaccess:
<Limit ALL>Deny from all
</Limit>If you want to allow access only from a specific IP address:
<Limit ALL>Allow from xx.xx.xx.xx
Deny from all
</Limit>Where xx.xx.xx.xx is the required IP address.
Otherwise, if you want to deny access from a specific address:
<Limit ALL>Order deny, allow
Allow from all
Deny from xx.xx.xx.xx
</Limit>You can also restrict permissions for a specific ftp user. To deny write access for the login_ftp user, where login is your hosting service ID, use the following directives in .ftpaccess:
<Limit WRITE>DenyUser login_ftp
</Limit>Other .ftpaccess directives
Delete files that were not fully downloaded:
DeleteAbortedStores onDo not display hidden files with names starting with a dot:
ListOptions "+a"Prohibit overwriting existing files:
AllowOverwrite off