LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   VSFTPD question...active/passive mode (https://www.linuxquestions.org/questions/linux-networking-3/vsftpd-question-active-passive-mode-385105/)

lapzlinux 11-21-2005 04:59 AM

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

pk21 11-21-2005 05:28 AM

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"

lapzlinux 11-21-2005 05:41 AM

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"

master_boy 12-18-2005 07:23 AM

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

Annielover 08-06-2011 01:54 AM

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.


All times are GMT -5. The time now is 01:02 AM.