This discussion is archived
4 Replies Latest reply: Feb 27, 2013 1:42 PM by Dude! RSS

autostart of vsftpd

EdStevens Guru
Currently Being Moderated
This is a vm under VBox that I am configuring for some specific tests.

Trying to get the ftp daemon to start on server reboot.

Here's the vitals:
[root@vbdwprod rc3.d]# uname -a
Linux vbdwprod.vbdomain 2.6.32-100.26.2.el5 #1 SMP Tue Jan 18 20:11:49 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@vbdwprod rc3.d]#
Successfully downloaded and installed vsftpd from Oracle's public yum server. Am able to get the service started manually with 'service vsftpd start', and at that point it does accept connections from another vm also running under VBox on my desktop.

If I run a 'chkconfig vsftpd' there is no visible response (should there be?). All the init files seem to be in place
[root@vbdwprod etc]# pwd
/etc
[root@vbdwprod etc]# find . -name "vsftpd*"
./logrotate.d/vsftpd.log
./vsftpd
./vsftpd/vsftpd_conf_migrate.sh
./vsftpd/vsftpd.conf
./rc.d/init.d/vsftpd
./pam.d/vsftpd
[root@vbdwprod etc]#
But still, when I reboot the vm, I still have to log on as root and manually start it with the 'services' command.

I'm sure I'm overlooking an 'oh for dumb' issue, but I'm on the fringes of my knowledge here. Everything I've read so far ("Red Hat Linux Administration 5" and several support forums) says the 'chkconfig' command should have done the trick.

hmm. There is also this file:
[root@vbdwprod init.d]# pwd
/etc/init.d
[root@vbdwprod init.d]# ls -l vsftp*
-rwxr-xr-x 1 root root 1660 Jan  8 23:23 vsftpd
[root@vbdwprod init.d]#
Odd that the previous 'find' command didn't turn it up.

Edited by: EdStevens on Feb 27, 2013 2:39 PM
  • 1. Re: autostart of vsftpd
    Justin_Mungal Journeyer
    Currently Being Moderated
    EdStevens wrote:
    This is a vm under VBox that I am configuring for some specific tests.

    Trying to get the ftp daemon to start on server reboot.

    Here's the vitals:
    [root@vbdwprod rc3.d]# uname -a
    Linux vbdwprod.vbdomain 2.6.32-100.26.2.el5 #1 SMP Tue Jan 18 20:11:49 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
    [root@vbdwprod rc3.d]#
    Successfully downloaded and installed vsftpd from Oracle's public yum server. Am able to get the service started manually with 'service vsftpd start', and at that point it does accept connections from another vm also running under VBox on my desktop.

    If I run a 'chkconfig vsftpd' there is no visible response (should there be?). All the init files seem to be in place
    [root@vbdwprod etc]# pwd
    /etc
    [root@vbdwprod etc]# find . -name "vsftpd*"
    ./logrotate.d/vsftpd.log
    ./vsftpd
    ./vsftpd/vsftpd_conf_migrate.sh
    ./vsftpd/vsftpd.conf
    ./rc.d/init.d/vsftpd
    ./pam.d/vsftpd
    [root@vbdwprod etc]#
    But still, when I reboot the vm, I still have to log on as root and manually start it with the 'services' command.

    I'm sure I'm overlooking an 'oh for dumb' issue, but I'm on the fringes of my knowledge here. Everything I've read so far ("Red Hat Linux Administration 5" and several support forums) says the 'chkconfig' command should have done the trick.

    hmm. There is also this file:
    [root@vbdwprod init.d]# pwd
    /etc/init.d
    [root@vbdwprod init.d]# ls -l vsftp*
    -rwxr-xr-x 1 root root 1660 Jan  8 23:23 vsftpd
    [root@vbdwprod init.d]#
    Odd that the previous 'find' command didn't turn it up.

    Edited by: EdStevens on Feb 27, 2013 2:39 PM
    Try:
    chkconfig --list vsftpd
    It will be listed as off under most run levels, most likely. To enable it, you can run:
    chkconfig vsftpd on
    Then if you run the list command again, it should be showing as enabled for run levels 3 and 5. To see what run level you're in, use:
    runlevel
    Edited by: Justin Mungal on Feb 27, 2013 2:53 PM
  • 2. Re: autostart of vsftpd
    EdStevens Guru
    Currently Being Moderated
    That was it. And now I feel really embarrassed. If I had just checked the man page for chkconfig, I'd probably have figured it out. Was relying too much on other sources that never mentioned the runlevel options -- and I was even suspecting that it was related to runlevels .... .
  • 3. Re: autostart of vsftpd
    Justin_Mungal Journeyer
    Currently Being Moderated
    EdStevens wrote:
    That was it. And now I feel really embarrassed. If I had just checked the man page for chkconfig, I'd probably have figured it out. Was relying too much on other sources that never mentioned the runlevel options -- and I was even suspecting that it was related to runlevels .... .
    No need for embarrassment; we can't know it all. I was just glad to be able help someone who helps others practically all day, everyday. I'm continually amazed by your patience.
  • 4. Re: autostart of vsftpd
    Dude! Guru
    Currently Being Moderated
    Btw, if all you need is to enable ftp access, the following might be useful and easier than to install vsftpd.
    cd /etc/xinetd.d/
    vi gssftp
    
    Change the following: 
    disable = yes to disable = no. 
    remove the –a option in the server_args line.
    
    /etc/init.d/xinetd restart
    
    You should now be able to FTP to your server.
    That way you do not have to install, configure and to learn about additional software. Unfortunately however it is not available under RHEL 6 or OL 6 anymore.

    Or use sftp or scp, which are part of SSH2 and work right out of the box.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points