LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-21-2005, 04:59 AM   #1
lapzlinux
LQ Newbie
 
Registered: Nov 2005
Location: Hong Kong
Posts: 5

Rep: Reputation: 0
VSFTPD question...active/passive mode


Hi everybody,

as i know there are two mode of the ftp in linux...

i am using vsftpd...and the default mode is passive mode..and it is quit complex to host a ftp using this mode for me...i can start it in passive mode..but i got some problem in file transfering and creating...haha..

so i changed it to active mode...and I wanna know that what is the main different in these two mode? (i know sth is active mode using port 21 for cmd and 20 for data, and passive mode is 21 and port>1024) ..
but i wanna know is it less security in active mode???? sth like that..

also, I wanna know hot to stop or restart the ftp??

i am using Fedora Core 4...and vsftpd 2.0.3..
and i start my ftp using "/usr/local/sbin/vsftpd &"
and i cannot use "services vsftpd stop" and "/etc/init.d/vsftpd stop" these 2 method to stop the ftp...help me plz.... thank you

Thank you very much.

Regards,
Kedric
 
Old 11-21-2005, 05:28 AM   #2
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
Re: VSFTPD question...active/passive mode

Quote:
Originally posted by lapzlinux

also, I wanna know hot to stop or restart the ftp??

i am using Fedora Core 4...and vsftpd 2.0.3..
and i start my ftp using "/usr/local/sbin/vsftpd &"
and i cannot use "services vsftpd stop" and "/etc/init.d/vsftpd stop" these 2 method to stop the ftp...help me plz.... thank you
To restart vsftpd it is "service vsftpd restart" or "/etc/rc.d/init.d/vsftpd restart"
 
Old 11-21-2005, 05:41 AM   #3
lapzlinux
LQ Newbie
 
Registered: Nov 2005
Location: Hong Kong
Posts: 5

Original Poster
Rep: Reputation: 0
Re: Re: VSFTPD question...active/passive mode

Quote:
Originally posted by pk21
To restart vsftpd it is "service vsftpd restart" or "/etc/rc.d/init.d/vsftpd restart"

thanks..but when I use "service vsftpd restart"
it told me command not found

and for the second one.....do i have to copy "vsftpd" file to "/etc/rc.d/init.d/" ??
because there is not a "vsftpd" file inside /init.d folder...
and i have tried to copy vsftpd file into there...and run that command...
it told me "500 OOPS: vsftpd: cannot open config file:stop"
 
Old 12-18-2005, 07:23 AM   #4
master_boy
LQ Newbie
 
Registered: Jul 2005
Location: Slovakia
Distribution: Debian 3.1
Posts: 16

Rep: Reputation: 0
Hi lapzlinux

If you don't have /etc/init.d/vsftpd (or "/etc/rc.d/init.d/vsftpd", you should create a vsftpd script file in /etc/init.d/ (or /etc/rc.d/init.d/ according as your distro ) and put in this script.

Here is my vsftpd script:

##################################################################################################
#!/bin/sh
# /etc/init.d/vsftpd
#
# Written by Sander Smeenk <ssmeenk@debian.org>

set -e

# Exit if vsftpd.conf doesn't have listen=yes or listen_ipv6=yes
# (mandatory for standalone operation)
if [ -f /etc/vsftpd.conf ] && ! egrep -iq "^ *listen(_ipv6)? *= *yes" /etc/vsftpd.conf; then
exit 0
fi

DAEMON=/usr/sbin/vsftpd
NAME=vsftpd

test -x $DAEMON || exit 0

case "$1" in
start)
echo -n "Starting FTP server: $NAME"
start-stop-daemon --start --background -m --pidfile /var/run/vsftpd/vsftpd.pid --exec $DAEMON
echo "."
;;
stop)
echo -n "Stopping FTP server: $NAME"
start-stop-daemon --stop --pidfile /var/run/vsftpd/vsftpd.pid --oknodo --exec $DAEMON
echo "."
;;
restart)
echo -n "Restarting FTP server: $NAME"
start-stop-daemon --stop --pidfile /var/run/vsftpd/vsftpd.pid --oknodo --exec $DAEMON
start-stop-daemon --start --background -m --pidfile /var/run/vsftpd/vsftpd.pid --exec $DAEMON
echo "."
;;
reload|force-reload)
echo "Reloading $NAME configuration files"
start-stop-daemon --stop --pidfile /var/run/vsftpd/vsftpd.pid --signal 1 --exec $DAEMON
echo "."
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload}"
exit 1
;;
esac

exit 0
##################################################################################################

When you are ready,(use : su [then you user account changes as root] change the script execution attributes (use : chmod 766 vsftpd). Yet you can use command /etc/init.d/vsftpd start|stop (or "/etc/rc.d/init.d/vsftpd start|stop".

I hope that this reply will help you.

Best

master_boy
 
Old 08-06-2011, 01:54 AM   #5
Annielover
Member
 
Registered: May 2011
Location: Belgium
Distribution: Ubuntu Server Edition, Fedora 16
Posts: 90

Rep: Reputation: 8
The code
Code:
service vsftpd restart
wont't work, you have to execute the command as root.
So try
Code:
sudo service vsftpd restart
This should work.
 
  


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
FTP: active and passive mode problem with some windows client tda71 Linux - Networking 2 06-14-2005 08:31 AM
Passive/Active mode in Konqueror & .netrc perl21 SUSE / openSUSE 0 03-18-2005 08:11 PM
Konqueror FTP passive/active problem & .netrc perl21 Linux - General 0 03-17-2005 04:43 PM
passive+active connections and fxp+glftpd NonSumPisces Linux - Newbie 0 08-27-2004 01:39 PM
Active and Passive FTP sancho5 Linux - Networking 3 11-24-2001 09:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:32 PM.

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