Introduction
This article provides the steps needed to change the FTP port number for the pure-ftpd service.
Procedure
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Open the
/var/cpanel/conf/pureftpd/local
file in your preferred text editor. - Add or edit the
Bind:
line with the new port number.Bind: $portnum
Please note that in the above example, "$portnum" must be replaced with the new port number.
The new port number must not be in use by any other service. - Save the changes and exit the text file.
- Run the following command to rebuild the FTP configuration.
/scripts/setupftpserver pure-ftpd --force
- Open the
/usr/local/cpanel/src/chkservd/chkserv.d/ftpd
file in your preferred text editor. - Update the listed port number with the new port number.
service[ftpd]=$portnum,QUIT,220,/usr/local/cpanel/scripts/restartsrv_ftpserver,proftpd||pure-ftpd&&pure-authd,root|nobody,220|USER %service_auth_user%|3|PASS %service_auth_pass%|2|QUIT
Please note that in the above example, "$portnum" must be replaced with the new port number. - Save the changes and exit the text editor.
- Restart the
chkservd
service./scripts/restartsrv_chkservd
Additional resources
How to Edit FTP Server Configuration from the Command Line: Pure-FTP configuration
Comments
0 comments
Article is closed for comments.