Server Administration & Management

How to Secure FTP by changing FTP Port number in Pure-FTP

In recent few months FTP brute force attacks increased on most the cPanel servers. To avoid such attacks, we can simple default FTP account or change FTP port. If you are shared server then client won’t be happy after disabling default FTP which is cPanel login details. There for simply change the FTP port number by using following steps.

1. Log in to server as root user and open default FTP configuration file.

# vi  /etc/pure-ftpd.conf

Search for following line and change it



Note: It means all ip will connect to FTP service on port 121 but make sure that you have opened a port 121 in server firewall and restart the FTP service.

November 26, 2011 Posted by | FTP, Pure-FTPd | , | Leave a comment

Logs files in linux (cPanel)

In a cPanel server, you may find logs are often stored differently comapring a control panel less server. Even Plesk saves logs in different paths. Here is a list of services and their log path that may help you finding the logs.


hostname should be resemble your hostname.




/var/log/xferlog  (symlinked to /usr/local/apache/domlogs/ftpxferlog)

System (cron, syslog, named, etc)

Security (ssh, ModSecurity, etc)

August 15, 2011 Posted by | Apache, cPanel, Cron, DNS, Exim, Mod_Security, MySQL, Pure-FTPd, SSH, Tips & Tricks, Unix/Linux | , , , , , , , , , , | Leave a comment

How to see more than 2000 files in FTP on a cPanel server

So, you have a lot of files on your website, so many that when you login via FTP, it can’t even list them all?  Here’s a quick fix. This only applies if you’re using Pure-FTPD

1. SSH into your server as root

2. Edit /etc/pure-ftpd.conf

# vi /etc/pure-ftpd.conf

3. Change LimitRecursion 2000 8 to LimitRecursion 4000 8

2000 8 –> 4000 8

4. Restart pure-ftpd in WHM or in SSH via service pure-ftpd restart

# /etc/init.d/pure-ftpd stop

# /etc/init.d/pure-ftpd start

You can increase 2000 to however many files you need to be displayed in the FTP Client window, but be aware that it may take longer to load, and your session may timeout.

May 15, 2011 Posted by | cPanel, FTP, Pure-FTPd | , , | 3 Comments

How to enable passive ftp in Pure-FTPd

For users that are behind a firewall it might be required that you enable passive ftp in your ftp server and client in Pure-FTp Software. We can enable passive ftp  by following steps as root user :-

1. Login to your server using a SSH

2. Open the Pure-FTPd configuration file in your favorite editor

# vi /etc/pure-ftpd.conf

3. Uncomment the line that starts with PassivePortRange and add:

PassivePortRange 61001 65535

4. Restart Pure-FTPd with the command:

# service pure-ftpd restart “OR” /etc/init.d/pure-ftpd restart

5. Please allow inbound connections  ports in firewall.

January 27, 2011 Posted by | FTP, Pure-FTPd | , | 1 Comment