Find the answer to your Linux question:
Results 1 to 8 of 8
I have been fighting with this for a little more than three days now. I set up a webserver on CentOS 6.4. Everything is working great. Except vsftp. When I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! TheAlmightyOS's Avatar
    Join Date
    Feb 2009
    Location
    Earth?
    Posts
    42

    vsftpd failing to start on CentOS 6.4


    I have been fighting with this for a little more than three days now.

    I set up a webserver on CentOS 6.4. Everything is working great. Except vsftp. When I attempt to start the service I get this:
    Code:
    [root@www ~]# service vsftpd start
    Starting vsftpd for vsftpd:                                [FAILED]
    I am just stumped. below is my config file. maybe you guys can see what I am missing.

    Code:
    # Example config file /etc/vsftpd/vsftpd.conf
    #
    # The default compiled in settings are fairly paranoid. This sample file
    # loosens things up a bit, to make the ftp daemon more usable.
    # Please see vsftpd.conf.5 for all compiled in defaults.
    #
    # READ THIS: This example file is NOT an exhaustive list of vsftpd options.
    # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
    # capabilities.
    #
    # Allow anonymous FTP? (Beware - allowed by default if you comment this out).
    anonymous_enable=NO
    #
    # Uncomment this to allow local users to log in.
    local_enable=YES
    #
    # Uncomment this to enable any form of FTP write command.
    write_enable=YES
    #
    # Default umask for local users is 077. You may wish to change this to 022,
    # if your users expect that (022 is used by most other ftpd's)
    local_umask=022
    #
    # Uncomment this to allow the anonymous FTP user to upload files. This only
    # has an effect if the above global write enable is activated. Also, you will
    # obviously need to create a directory writable by the FTP user.
    #anon_upload_enable=YES
    #
    # Uncomment this if you want the anonymous FTP user to be able to create
    # new directories.
    #anon_mkdir_write_enable=YES
    #
    # Activate directory messages - messages given to remote users when they
    # go into a certain directory.
    dirmessage_enable=YES
    #
    # The target log file can be vsftpd_log_file or xferlog_file.
    # This depends on setting xferlog_std_format parameter
    xferlog_enable=YES
    #
    # Make sure PORT transfer connections originate from port 20 (ftp-data).
    connect_from_port_20=YES
    #
    # If you want, you can arrange for uploaded anonymous files to be owned by
    # a different user. Note! Using "root" for uploaded files is not
    # recommended!
    #chown_uploads=YES
    #chown_username=whoever
    #
    # The name of log file when xferlog_enable=YES and xferlog_std_format=YES
    # WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log
    #xferlog_file=/var/log/xferlog
    #
    # Switches between logging into vsftpd_log_file and xferlog_file files.
    # NO writes to vsftpd_log_file, YES to xferlog_file
    xferlog_std_format=YES
    #
    # You may change the default value for timing out an idle session.
    #idle_session_timeout=600
    #
    # You may change the default value for timing out a data connection.
    #data_connection_timeout=120
    #
    # It is recommended that you define on your system a unique user which the
    # ftp server can use as a totally isolated and unprivileged user.
    #nopriv_user=ftpsecure
    #
    # Enable this and the server will recognise asynchronous ABOR requests. Not
    # recommended for security (the code is non-trivial). Not enabling it,
    # however, may confuse older FTP clients.
    #async_abor_enable=YES
    #
    # By default the server will pretend to allow ASCII mode but in fact ignore
    # the request. Turn on the below options to have the server actually do ASCII
    # mangling on files when in ASCII mode.
    # Beware that on some FTP servers, ASCII support allows a denial of service
    # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
    # predicted this attack and has always been safe, reporting the size of the
    # raw file.
    # ASCII mangling is a horrible feature of the protocol.
    #ascii_upload_enable=YES
    #ascii_download_enable=YES
    #
    # You may fully customise the login banner string:
    #ftpd_banner=Welcome to blah FTP service.
    #
    # You may specify a file of disallowed anonymous e-mail addresses. Apparently
    # useful for combatting certain DoS attacks.
    #deny_email_enable=YES
    # (default follows)
    #banned_email_file=/etc/vsftpd/banned_emails
    #
    # You may specify an explicit list of local users to chroot() to their home
    # directory. If chroot_local_user is YES, then this list becomes a list of
    # users to NOT chroot().
    chroot_local_user=NO
    chroot_list_enable=YES
    # (default follows)
    #chroot_list_file=/etc/vsftpd/chroot_list
    #
    # You may activate the "-R" option to the builtin ls. This is disabled by
    # default to avoid remote users being able to cause excessive I/O on large
    # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
    # the presence of the "-R" option, so there is a strong case for enabling it.
    #ls_recurse_enable=YES
    #
    # When "listen" directive is enabled, vsftpd runs in standalone mode and
    # listens on IPv4 sockets. This directive cannot be used in conjunction
    # with the listen_ipv6 directive.
    
    pam_service_name=vsftpd
    userlist_enable=YES
    tcp_wrappers=YES
    
    #SECURITY
    ssl_enable=yes
    allow_anon_ssl=no
    force_local_data_ssl=yes
    force_local_logins_ssl=yes
    ssl_tlsv1=yes
    ssl_sslv2=yes
    ssl_sslv3=yes
    listen_port=900
    rsa_cert_file=/etc/vsftpd/vsftpd.pem
    force_dot_files=yes

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,737
    Look in /var/log to see what is being reported by in xferlog file. Also, I see that you turned off the listen=YES parameter which allows connection via IPv4, yet you haven't enabled the listen_ipv6 parameter.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined! TheAlmightyOS's Avatar
    Join Date
    Feb 2009
    Location
    Earth?
    Posts
    42
    I tried to open /var/log/xferlog in nano. Just comes up with a blank file. I also saw a few xferlog-"date" files. I opened those as well but they were empty as well.

    As for the config file, I am sure it has a ton of mistakes. Thank you for pointing that out. I am sure there are more. Tell me all of them because I have never used vsftp before and the config file is confusing me.

  4. $spacer_open
    $spacer_close
  5. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    try running the daemon on the command line explicitly, e.g.:

    Code:
    /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
    of course, your binary or config file might be in a different place.

  6. #5
    Just Joined! TheAlmightyOS's Avatar
    Join Date
    Feb 2009
    Location
    Earth?
    Posts
    42
    Well, that worked. Thanks!

    Now on to my config file which could take a while. I swear, I have never seen a FTP server as complicated as this one

    Oh, one last question:
    Being that I have to run it explicitly, do I need to do something different in order to have it run at startup?

  7. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by TheAlmightyOS View Post
    Now on to my config file which could take a while. I swear, I have never seen a FTP server as complicated as this one
    that's funny. vsftpd is usually a walk in the park. did you muck w/the initscript, possibly? also, you might want to consider reinstall the default config file, if you mucked a lot w/that, and just add in your changes one by one, testing along the way.

    do this to see what files have changed in the vsftpd RPM package:
    Code:
    rpm -qV vsftpd
    to get the original state back, do this:
    Code:
    cp /etc/vsftpd/vsftpd.conf /tmp/vsftpd.conf.bak # optional
    rpm -e --justdb vsftpd
    yum install vsftpd
    Being that I have to run it explicitly, do I need to do something different in order to have it run at startup?
    again, did you muck w/the initscript? not sure why that is happening. hopefully restarting with a fresh copy of the package will get it sorted. but if not, at least you'll be at a saner point.

  8. #7
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,737
    FWIW, atreyu usually has good insights into why stuff doesn't work - a lot of experience of that I suppose. Sorry atreyu - couldn't help myself!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  9. #8
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by Rubberman View Post
    FWIW, atreyu usually has good insights into why stuff doesn't work - a lot of experience of that I suppose. Sorry atreyu - couldn't help myself!
    oh, too true! i've broke more stuff than I've fixed, and I ain't done yet...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •