AFP548 Changing the world one server at a time.

vsftpd 2.0.6, login problem

Home › Forums › OS X Server and Client Discussion › Misc. › vsftpd 2.0.6, login problem

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #372812
    bogdan
    Participant

    Hi, everyone.

    I recently installed the latest vsftpd (2.0.6) and it seems that I’m missing something because I cannot login.

    As the config is a little bit complicated, I will explain what I am looking for. I have two users which should connect to the server, each one receiving a special location to download/upload only his own files. No anonymous connections are accepted. All connections from 127.0.0.1 only at this time.

    Users are ‘bogdan’ and ‘bogdan2’. I wanted each one of the users to have its own folder in /Users/ftp, so I mkdir /Users/ftp/bogdan and /Users/ftp/bogdan1

    These are the config lines/files. I marked the path with bold and the file content with italics.

    /etc/hosts.allow
    vsftpd : 127.0.0.1 : allow

    /opt/local/etc/vsftpd_login.db

    Comment: username and passwords, prepared with db_load (Berkeley).

    /etc/pam.d/vsftpd
    auth required /lib/security/pam_userdb.so db=/opt/local/etc/vsftpd_login
    account required /lib/security/pam_userdb.so db=/opt/local/etc/vsftpd_login

    /opt/local/etc/vsftpd.conf
    listen=YES
    listen_address=127.0.0.1
    background=YES
    connect_from_port_20=YES
    max_clients=5
    max_per_ip=4
    use_localtime=YES

    accept_timeout=60
    idle_session_timeout=300
    data_connection_timeout=300
    connect_timeout=60
    local_max_rate=0
    trans_chunk_size=0

    ssl_enable=NO

    run_as_launching_user=NO

    setproctitle_enable=NO
    listen_ipv6=NO
    hide_ids=YES

    ftpd_banner=Welcome to my ftp server.

    #local_root=/Users/ftp
    user_config_dir=/opt/local/etc/vsftpd_user_conf

    userlist_enable=NO

    check_shell=NO

    local_enable=YES
    write_enable=NO
    download_enable=NO
    dirlist_enable=NO

    local_umask=022

    pasv_enable=YES
    pasv_promiscuous=NO
    port_enable=YES
    port_promiscuous=NO
    pasv_min_port=50000
    pasv_max_port=60000
    session_support=YES

    guest_enable=NO
    anonymous_enable=NO
    allow_anon_ssl=NO
    anon_mkdir_write_enable=NO
    anon_other_write_enable=NO
    anon_upload_enable=NO
    anon_world_readable_only=NO
    chmod_enable=NO
    chown_uploads=NO
    chroot_local_user=NO
    #chroot_list_enable=YES
    #chroot_list_file=/opt/local/etc/vsftpd.chroot_list
    deny_file={*.exe,*.com,*.bat,*.avi,*.mpg}
    one_process_model=NO

    dirmessage_enable=NO
    xferlog_enable=YES
    xferlog_file=var/log/vsftpd.log
    ascii_upload_enable=NO
    ascii_download_enable=NO
    ls_recurse_enable=NO

    pam_service_name=vsftpd

    #nopriv_user=ftpsecure

    /opt/local/etc/vsftpd_user_conf/bogdan
    echo “write_enable=YES” > /opt/local/etc/vsftpd_user_conf/bogdan
    echo “local_root=/Users/ftp/bogdan” > /opt/local/etc/vsftpd_user_conf/bogdan
    echo “download_enable=YES” > /opt/local/etc/vsftpd_user_conf/bogdan
    echo “dirlist_enable=YES” > /opt/local/etc/vsftpd_user_conf/bogdan
    echo “chroot_local_user=YES” > /opt/local/etc/vsftpd_user_conf/bogdan

    Comment: user ‘bogdan’ gets privileges on a per user basis.

    /opt/local/etc/vsftpd_user_conf/bogdan2
    echo “write_enable=YES” > /opt/local/etc/vsftpd_user_conf/bogdan2
    echo “local_root=/Users/ftp/bogdan2” > /opt/local/etc/vsftpd_user_conf/bogdan2
    echo “download_enable=YES” > /opt/local/etc/vsftpd_user_conf/bogdan2
    echo “dirlist_enable=YES” > /opt/local/etc/vsftpd_user_conf/bogdan2
    echo “chroot_local_user=YES” > /opt/local/etc/vsftpd_user_conf/bogdan2

    Comment: user ‘bogdan2’ gets privileges on a per user basis.

    I tried to login using the credentials from
    vsftpd_login.db file, but it didn’t work: “530 Login incorrect.”

    I also created the same users with the same passwords on localhost, changes the home directory to /Users/ftp/bogdan, given the GID 52 ftp-users with Netinfo manager. The same result.

    My guess is that something is wrong with the way users and passwords are created and permissions are set.

    Any idea where I got wrong and how can I make it work?

    Bogdan

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.