ProFTP & SuSe 10

Discussion in 'Server Operation' started by latcarf, Mar 9, 2006.

  1. falko

    falko Super Moderator Howtoforge Staff

    Please put

    into /etc/vsftpd.conf and restart vsftpd:
    /etc/init./vsftpd restart
    Please use the vsftpd init script in /etc/init.d to start/stop/restart vsftpd.
  2. latcarf

    latcarf New Member

    I changed the config file as you asked. The problem is I do not have a /etc/init./vsftpd file! A search for "vsftpd" got this
    file:///usr/sbin/vsftpd Indicates this is an Executable file
    The intersting thing is that in file:///usr/share/doc/packages/vsftpd I read that I do not need inted or xinted. There are various configs available so I selected the one I need (standalone), followed the instructions and it worked, almost. I still could not do an anonymous upload so I went back and changed the Write lines from NO to YES.
    The second issue came in then, Stop, Start, and Restart are not being recognized by Konsole. This is the responses I get
    server1:~ # vsftpd stop
    500 OOPS: vsftpd: cannot open config file:stop
    server1:~ # vsftpd start
    500 OOPS: vsftpd: cannot open config file:start
    server1:~ # vsftpd restart
    500 OOPS: vsftpd: cannot open config file:restart
    server1:~ # vsftpd &
    [1] 6542
    500 OOPS: could not bind listening IPv4 socket
    server1:~ #
    All the documentation I find points to using "&" to start the service but I am beginning to think this is not used to Stop or Restart the service. I am beginning to think that "&" is for start only and I keep getting
    [B]500 OOPS: could not bind listening IPv4 socket
    because it is already running and I need to restart it for changes to take effect. I have Googled myself silly trying to find "&" and what stop and restart might be but I am having no luck :(
  3. falko

    falko Super Moderator Howtoforge Staff

    It seems your vsftpd was run by xinetd, so you should have restarted xinetd.

    But now that you want to run it with an init script, you should check if /etc/init.d/vsftpd uses the correct config file (I guess it looks for /etc/vsftpd.conf instead of /etc/vsftpd/vsftpd.conf).

    You can kill the running vsftpd process with

    kill -9 27830
  4. latcarf

    latcarf New Member

    Ya Hoo! :D I finally got it up and running!!

    It was not running in xinted (I disabled that 2 days ago) and for some reason it never existed in init. :confused:

    The kill command was the key.
    vsftpd &
    was not stoping or restarting the service. After initial use if I changed the config file and run it again it would just return
    500 OOPS: could not bind listening IPv4 socket
    because it was already running.

    I finally found /usr/share/doc/packages/vsftpd and there was a folder called EXAMPLES. It gives several set-ups with the config files. I used INTERNET_SITE_NOINETD, changed a couple setting to YES and that did it!

    I need to figure out why commands (Start, Stop, Restart, nmap) don't seem to be working in my Konsole. Or is that a Gnome thing? I went KDE this time and while I like it better so far there are differences I am still adjusting too.

    thanks for the help falco!
  5. falko

    falko Super Moderator Howtoforge Staff

    It has nothing to do with your desktop.
    Maybe the init script wasn't made for SuSE. Might be worth a try to switch vsftpd back to xinetd.
  6. latcarf

    latcarf New Member

    That makes sense and is something I will research. If I find an answer I will post it here so others can will have an answer if they run into the same problem. I also had a thought last night (and it didn't even hurt!) after I posted, I have only seen "&" in the vsftpd documentation so it must be something basically exclusive to vsftpd.
    :eek: lol! no way!! its working the way I need it now... just a simple anonymous site for people to upload and download files for fractal programs.
  7. latcarf

    latcarf New Member

    better called "vsftpd and SuSe 10"

    as promised... what I learned! For some reason when the vsftpd rpm package supplied with SuSe 10 is installed it does not automatically create an init.d vsftpd script. After searching, trying, succeeding these are the steps to accomplish this on your own...

    1. vim or kwrite /etc/init.d/vsftpd (we are creating this as a new file)
    2. Copy and paste this into the file, then save and close:
    case "$1" in
        echo "Starting vsftpd ..."
        /usr/sbin/vsftpd &
        echo "Stopping vsftpd ..."
        killall vsftpd
        echo "Usage: 'basename $0' {start|stop}" >&2
        exit 64
    exit 0
    3. From terminal run:
    chmod +x /etc/init.d/vsftpd
    4. Open YaST, System, System Services (Runlevel).
    5. Select Expert Mode.
    6. Scroll down to vsftpd, highlight it and select the 3 and 5 runlevels, then Finish.
    7. Restart machine, from terminal run
     ps aux | grep vsftp
    You should see something to the effect of
    server1:~ # ps aux | grep vsftp
    root      3639  0.0  0.2   1828   536 ?        S    19:54   0:00 /usr/sbin/vsftpd
    root      3642  0.0  0.1   1520   448 ?        Ss   19:54   0:00 startpar -f -- vsftpd
    root      6005  0.0  0.2   1828   604 pts/1    R+   20:19   0:00 grep vsftp
    server1:~ #
    (note if run as user the last line will more than likely start with user name, shown as root above.)

    Hope this helps others in the future. :)

Share This Page