LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-01-2015, 09:58 AM   #1
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Rep: Reputation: Disabled
Can't seem to change default vsftpd port?


In my /etc/vsftpd.conf config I set it to use a different port than 21 and I restarted rc.inetd however if I try connecting to my FTP server with the custom port it won't connect. I think it is still using 21. I do not have 21 added on iptables firewall and have added the custom port on it. I used the listen_port=PORTHERE in vsftpd.conf
 
Old 08-01-2015, 12:01 PM   #2
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
What ftp client are you using to connect?

Did you tell this ftp client to use the custom port to connect to your ftp server?
 
Old 08-01-2015, 01:08 PM   #3
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mralk3 View Post
What ftp client are you using to connect?

Did you tell this ftp client to use the custom port to connect to your ftp server?
Filezilla, I told it to use my custom port and I know the client works because previously I had cents setup with same vsftpd setup and it would work fine.
 
Old 08-01-2015, 01:41 PM   #4
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by Altiris View Post
In my /etc/vsftpd.conf config I set it to use a different port than 21 and I restarted rc.inetd ...
Stock rc.inetd doesn't start/stop vsftpd. You'll need to use:

START: /usr/sbin/vsftpd
STOP: killall vsftpd

Or you could build a script:
Code:
#!/bin/sh
#
# /etc/rc.d/rc.vsftpd
#
# Start/stop the VSFTP server.
#
# To make VSFTP start automatically at boot, make this
# file executable:  chmod 755 /etc/rc.d/rc.vsftpd
#

case "$1" in
   'start')
      /usr/sbin/vsftpd & ;;
   'stop')
      killall vsftpd ;;
   *)
      echo "usage $0 start|stop" ;;
esac
Then add this to your rc.local
Code:
# VSFTPD
if [ -x /etc/rc.d/rc.vsftpd ]; then
  echo START vsftpd - /etc/rc.d/rc.vsftpd start
  /etc/rc.d/rc.vsftpd start
fi
Hope that helps!

Last edited by Chuck56; 08-01-2015 at 01:48 PM.
 
Old 08-01-2015, 03:31 PM   #5
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Chuck56 View Post
Stock rc.inetd doesn't start/stop vsftpd. You'll need to use:

START: /usr/sbin/vsftpd
STOP: killall vsftpd

Or you could build a script:
Code:
#!/bin/sh
#
# /etc/rc.d/rc.vsftpd
#
# Start/stop the VSFTP server.
#
# To make VSFTP start automatically at boot, make this
# file executable:  chmod 755 /etc/rc.d/rc.vsftpd
#

case "$1" in
   'start')
      /usr/sbin/vsftpd & ;;
   'stop')
      killall vsftpd ;;
   *)
      echo "usage $0 start|stop" ;;
esac
Then add this to your rc.local
Code:
# VSFTPD
if [ -x /etc/rc.d/rc.vsftpd ]; then
  echo START vsftpd - /etc/rc.d/rc.vsftpd start
  /etc/rc.d/rc.vsftpd start
fi
Hope that helps!
Okay thanks...that's really weird/backwards. Why does every other similar program that comes with Slackware have its own rc. file (rc.cups, rc.samba, rc.httpd etc) except for vsftpd? Seems kind of against the philosophy in the "ease of use" part.


EDIT!!: Okay, this doesn't seem to work if listen=NO in vsftpd.conf however setting listen=YES makes it work...VERY WEIRD.

Last edited by Altiris; 08-01-2015 at 04:00 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] running vsftpd on a different port other than default 21? unable to get it working? cyberdome Linux - Newbie 19 04-09-2014 01:57 PM
VSFTPD Multiple FTP sites with default port '21' maddy_elx Linux - Networking 2 05-30-2011 10:19 AM
PLESK [Solution] Change port to 23 (telnet) instead of default port 8443 x5452 Linux - Software 6 05-10-2009 05:58 AM
Change VSFTPD Port Fedora 2 br00tal Linux - Networking 3 04-09-2005 09:35 AM
vsftpd xinetd bbbbbbbbbbbbbChanging default port jakcap Linux - Newbie 2 07-26-2003 06:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration