changing the default port for PureFTPd

cornishman33

Member
Jun 25, 2014
11
2
3
Kernow, Nr England
cPanel Access Level
Root Administrator
I am having trouble changing the default port for PureFTPd from 21 to **** (another port)
I went through the procedure I have followed for the past five years, which has always worked perfectly, but for some reason this time it simply refuses to allow connections.

The procedure I follow is to initially run netstat -an and find an unused port, then change the "bind" in both /var/cpanel/conf/pureftpd/main AND /etc/pure_ftp.conf, then allow the new port in the iptables then reboot the service pureftpd. I am NOT running a firewall.

But as I say, with the new port nobody can connect using ftp. Revert to default port (21) and everything works fine.
Anybody have any ideas what I am doing wrong? All suggestions will be greatly appreciated.

From FileZilla debug
Status: Resolving address of cornish****.net
Status: Connecting to 51.254.135.58:****...
Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server".
Trace: CRealControlSocket::OnClose(61)
Trace: CControlSocket::DoClose(64)
Trace: CFtpControlSocket::ResetOperation(66)
Trace: CControlSocket::ResetOperation(66)
Error: Could not connect to server
Trace: CFileZillaEnginePrivate::ResetOperation(66)
Status: Waiting to retry...
Trace: CControlSocket::DoClose(64)
Trace: CControlSocket::DoClose(64)
Status: Resolving address of cornish****.net
Status: Connecting to 51.254.135.58:****...
Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server".
Trace: CRealControlSocket::OnClose(61)
Trace: CControlSocket::DoClose(64)
Trace: CFtpControlSocket::ResetOperation(66)
Trace: CControlSocket::ResetOperation(66)
Error: Could not connect to server
Trace: CFileZillaEnginePrivate::ResetOperation(66)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

Could you verify if the FTP process is running? EX:

Code:
ps aux|grep ftp
Have you tried an alternate port other than the one you are using to rule out any issues with that particular port number?

Thank you.
 

cornishman33

Member
Jun 25, 2014
11
2
3
Kernow, Nr England
cPanel Access Level
Root Administrator
Hello :)

Could you verify if the FTP process is running? EX:
# ps aux|grep ftp
root 7715 0.0 0.0 55696 2288 ? Ss 07:23 0:00 /usr/libexec/openssh/sftp-server
root 8386 0.0 0.0 136752 2116 ? Ss 07:24 0:00 pure-ftpd (SERVER)
root 8388 0.0 0.0 136132 1804 pts/1 S 07:24 0:00 /usr/sbin/pure-authd -s /var/run/ftpd.sock -r /usr/local/cpanel/bin/pureauth
root 8891 0.0 0.0 103304 892 pts/1 S+ 07:25 0:00 grep ftp
Have you tried an alternate port other than the one you are using to rule out any issues with that particular port number?

Thank you.
Yes, been experimenting for the last hour. Same result across the board.


Do you notice any specific error messages in /var/log/messages when attempting to access FTP?
No, I did a test at precisely 0700 Zulu and the results showed nothing:
Oct 30 06:59:12 cornish*** nscd: 1344 monitoring file `/etc/passwd` (13)
Oct 30 06:59:12 cornish*** nscd: 1344 monitoring directory `/etc` (2)
Oct 30 06:59:13 cornish*** nscd: 1344 monitoring file `/etc/group` (14)
Oct 30 06:59:13 cornish*** nscd: 1344 monitoring directory `/etc` (2)
Oct 30 06:59:13 cornish*** nscd: 1344 monitoring file `/etc/passwd` (13)
Oct 30 06:59:13 cornish*** nscd: 1344 monitoring directory `/etc` (2)
Oct 30 06:59:19 cornish*** nscd: 1344 monitored file `/etc/group` changed (mtime)
Oct 30 07:03:03 cornish*** nscd: 1344 monitoring file `/etc/group` (14)
Oct 30 07:03:03 cornish*** nscd: 1344 monitoring directory `/etc` (2)
Oct 30 07:03:03 cornish*** nscd: 1344 monitoring file `/etc/passwd` (13)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

Thank you.