Restricting FTP Access Using .ftpaccess

For Linux hosting packages

Learn how to deny specific IP addresses access to your FTP directories using a .ftpaccess file . We also show you how to restrict access for certain FTP users.

Create a .ftpaccess file

Create a new text file named .ftpaccess. Use a plain text editor such as "Notepad" on Windows, "TextEdit" on Mac OS X or "vim" on Linux.

Configure visibility of .ftpaccess for a specific FTP user:

HideFiles (\.ftpaccess|\.htaccess|\.htpasswd)$ user !u12345678
<Limit ALL>
IgnoreHidden on
</Limit>
<Limit ALL>
Order allow,deny
Deny from 12.34.56.78
Deny from 87.65.43.21
</Limit>
<Limit ALL>
DenyUser u12345678, u87654321
</Limit>

Other useful rules and directives can be found at: http://www.proftpd.org/docs/howto/Limit.html

Upload .ftpaccess to Webspace

Use the WebspaceExplorer or an FTP program such as FileZilla to upload the created file to your web space. With the .ftpaccess file you can configure the FTP in the way that you want. You should set the access rights for the file to 0600 so that only you have read and write access to the file and it is accessible via HTTP.

Please Note:

The .ftpaccess file is recursive. This means that the defined rules apply to the folder and all subfolders in which you store the file.