Page 6 of 14 FirstFirst ... 45678 ... LastLast
Results 51 to 60 of 134

Thread: Howto: Easy FTP with vsftpd

  1. #51
    Join Date
    Sep 2007
    Beans
    572
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    Re: Howto: Easy FTP with vsftpd

    Is there a way to set it up so that you can use the same username as an account on the machine with a different password?

  2. #52
    Join Date
    Oct 2009
    Location
    bay area, california
    Beans
    1

    Re: Howto: Easy FTP with vsftpd

    Very nice tutorial, thanks!

    However... I want to give real users the ability to log in via ftp AND create some virtual users at the same time. The additional lines in the /etc/pam.d/vsftpd config file...

    auth required /lib/security/pam_userdb.so db=/etc/vsftpd_login
    account required /lib/security/pam_userdb.so db=/etc/vsftpd_login

    ...causes access for normal users (those with entries in /etc/passwd) to no longer work. So how can I do both?

    Thanks,
    B.

  3. #53
    Join Date
    Jun 2007
    Location
    Leeds, UK
    Beans
    136
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Howto: Easy FTP with vsftpd

    I have tried following this tutorial on 9.10 but I can't get access to the ftp-files folder I created or access using ftp localhost.

    I have posted the terminal session from the install and configuration and my /etc/vsftp.conf file, I would be grateful if someone could look at these and let me know what i have done wrong?

    Terminal session info:

    Code:
    home@server:~$ sudo apt-get install vsftpd
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following NEW packages will be installed
      vsftpd
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0B/144kB of archives.
    After this operation, 475kB of additional disk space will be used.
    Preconfiguring packages ...
    Selecting previously deselected package vsftpd.
    (Reading database ... 64489 files and directories currently installed.)
    Unpacking vsftpd (from .../vsftpd_2.2.0-1ubuntu1_amd64.deb) ...
    Processing triggers for man-db ...
    Setting up vsftpd (2.2.0-1ubuntu1) ...
    update-rc.d: warning: vsftpd stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (1)
     * Starting FTP server: vsftpd                                                                       [ OK ] 
    
    home@server:~$ sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.original
    home@server:~$ sudo nano /etc/vsftpd.conf
    home@server:~$ sudo /etc/init.d/vsftpd restart
     * Stopping FTP server: vsftpd                                                                                                                 [ OK ] 
     * Starting FTP server: vsftpd                                                                                                                 [ OK ] 
    home@server:~$ sudo useradd -d /home/ftp-files ftp-users
    home@server:~$ sudo mkdir /home/ftp-files
    home@server:~$ sudo chown ftp-users /home/ftp-files
    home@server:~$ sudo mkdir /etc/vsftpd
    home@server:~$ sudo mkdir /etc/vsftpd/vusers
    home@server:~$ sudo nano /etc/vsftpd.conf
    home@server:~$ sudo nano /etc/pam.d/ftp
    home@server:~$ sudo nano logins.txt
    home@server:~$ sudo apt-get install db4.2-util
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following extra packages will be installed:
      libdb4.2
    The following NEW packages will be installed
      db4.2-util libdb4.2
    0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    Need to get 486kB of archives.
    After this operation, 1,266kB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Get: 1 http://gb.archive.ubuntu.com karmic/main libdb4.2 4.2.52+dfsg-5 [416kB]
    Get: 2 http://gb.archive.ubuntu.com karmic/universe db4.2-util 4.2.52+dfsg-5 [70.7kB]
    Fetched 486kB in 0s (607kB/s)    
    Selecting previously deselected package libdb4.2.
    (Reading database ... 64542 files and directories currently installed.)
    Unpacking libdb4.2 (from .../libdb4.2_4.2.52+dfsg-5_amd64.deb) ...
    Selecting previously deselected package db4.2-util.
    Unpacking db4.2-util (from .../db4.2-util_4.2.52+dfsg-5_amd64.deb) ...
    Setting up libdb4.2 (4.2.52+dfsg-5) ...
    Setting up db4.2-util (4.2.52+dfsg-5) ...
    home@server:~$ sudo db4.2_load -T -t hash -f logins.txt /etc/vsftpd/vsftpd_login.db
    home@server:~$ sudo chmod 600 /etc/vsftpd/vsftpd_login.db
    home@server:~$ sudo chmod 600 logins.txt
    home@server:~$ sudo nano /etc/vsftpd/ftp-users
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user1
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user2
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user3
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user4
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user5
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user6
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user7
    home@server:~$ sudo /etc/init.d/vsftpd restart
     * Stopping FTP server: vsftpd                                                                                                                        No /usr/sbin/vsftpd found running; none killed.
                                                                                                                                                   [ OK ]
     * Starting FTP server: vsftpd                                                                                                                 [ OK ] 
    home@server:~$ ftp localhost
    ftp: connect to address 127.0.0.1: Connection refused
    Trying 127.0.0.1...
    ftp: connect: Connection refused
    ftp>
    /etc/vsftp.conf file

    Code:
    listen=YES
    anonymous_enable=NO
    local_enable=YES
    write_enable=YES
    #local_umask=022
    #anon_upload_enable=YES
    #anon_mkdir_write_enable=YES
    #dirmessage_enable=YES
    use_localtime=YES
    xferlog_enable=YES
    connect_from_port_20=YES
    #chown_uploads=YES
    #chown_username=whoever
    #xferlog_file=/var/log/vsftpd.log
    #xferlog_std_format=YES
    #idle_session_timeout=600
    #data_connection_timeout=120
    #nopriv_user=ftpsecure
    #ftpd_banner=Welcome to blah FTP service.
    #deny_email_enable=YES
    #banned_email_file=/etc/vsftpd.banned_emails
    # chroot_list_enable below.
    # chroot_local_user=YES
    chroot_local_user=YES
    chroot_list_enable=NO
    #chroot_list_file=/etc/vsftpd.chroot_list
    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
    # Filezilla uses port 21 if you don't set any port
    # in Servertype "FTPES - FTP over explicit TLS/SSL"
    # Port 990 is the default used for FTPS protocol.
    # Uncomment it if you want/have to use port 990.
    #listen_port=990
    secure_chroot_dir=/var/run/vsftpd/empty
    pam_service_name=ftp
    rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    max_clients=2
    hide_ids=YES
    guest_enable=YES
    guest_username=ftp
    user_config_dir=/etc/vsftpd/vusers

  4. #54
    Join Date
    Nov 2009
    Location
    Austria
    Beans
    1
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Howto: Easy FTP with vsftpd

    Quote Originally Posted by roundhay View Post
    I have tried following this tutorial on 9.10 but I can't get access to the ftp-files folder I created or access using ftp localhost.
    I've got the same problem here... Any suggestions?

    B

  5. #55
    Join Date
    Apr 2009
    Beans
    1

    Angry Re: Howto: Easy FTP with vsftpd

    Hi guys. I am getting the same problem when I upgraded from 9.04. The server seemed to be running fine before now I don't have access to the ftp folder.

  6. #56
    Join Date
    Jan 2009
    Location
    Colorado
    Beans
    60
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Howto: Easy FTP with vsftpd

    Quote Originally Posted by DVDPSR View Post
    Hi guys. I am getting the same problem when I upgraded from 9.04. The server seemed to be running fine before now I don't have access to the ftp folder.
    What type of error msgs are you receiving? What ftp client are you using to connect to vsftpd?

    Did you check your log files for errors? If so, what do they say about the connection attempt?
    My Ubuntu ran hosting
    Josh Design - Web Hosting

  7. #57
    Join Date
    Jan 2009
    Location
    Colorado
    Beans
    60
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Howto: Easy FTP with vsftpd

    Quote Originally Posted by roundhay View Post
    I have tried following this tutorial on 9.10 but I can't get access to the ftp-files folder I created or access using ftp localhost.

    I have posted the terminal session from the install and configuration and my /etc/vsftp.conf file, I would be grateful if someone could look at these and let me know what i have done wrong?

    Terminal session info:

    Code:
    home@server:~$ sudo apt-get install vsftpd
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following NEW packages will be installed
      vsftpd
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0B/144kB of archives.
    After this operation, 475kB of additional disk space will be used.
    Preconfiguring packages ...
    Selecting previously deselected package vsftpd.
    (Reading database ... 64489 files and directories currently installed.)
    Unpacking vsftpd (from .../vsftpd_2.2.0-1ubuntu1_amd64.deb) ...
    Processing triggers for man-db ...
    Setting up vsftpd (2.2.0-1ubuntu1) ...
    update-rc.d: warning: vsftpd stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (1)
     * Starting FTP server: vsftpd                                                                       [ OK ] 
    
    home@server:~$ sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.original
    home@server:~$ sudo nano /etc/vsftpd.conf
    home@server:~$ sudo /etc/init.d/vsftpd restart
     * Stopping FTP server: vsftpd                                                                                                                 [ OK ] 
     * Starting FTP server: vsftpd                                                                                                                 [ OK ] 
    home@server:~$ sudo useradd -d /home/ftp-files ftp-users
    home@server:~$ sudo mkdir /home/ftp-files
    home@server:~$ sudo chown ftp-users /home/ftp-files
    home@server:~$ sudo mkdir /etc/vsftpd
    home@server:~$ sudo mkdir /etc/vsftpd/vusers
    home@server:~$ sudo nano /etc/vsftpd.conf
    home@server:~$ sudo nano /etc/pam.d/ftp
    home@server:~$ sudo nano logins.txt
    home@server:~$ sudo apt-get install db4.2-util
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following extra packages will be installed:
      libdb4.2
    The following NEW packages will be installed
      db4.2-util libdb4.2
    0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    Need to get 486kB of archives.
    After this operation, 1,266kB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Get: 1 http://gb.archive.ubuntu.com karmic/main libdb4.2 4.2.52+dfsg-5 [416kB]
    Get: 2 http://gb.archive.ubuntu.com karmic/universe db4.2-util 4.2.52+dfsg-5 [70.7kB]
    Fetched 486kB in 0s (607kB/s)    
    Selecting previously deselected package libdb4.2.
    (Reading database ... 64542 files and directories currently installed.)
    Unpacking libdb4.2 (from .../libdb4.2_4.2.52+dfsg-5_amd64.deb) ...
    Selecting previously deselected package db4.2-util.
    Unpacking db4.2-util (from .../db4.2-util_4.2.52+dfsg-5_amd64.deb) ...
    Setting up libdb4.2 (4.2.52+dfsg-5) ...
    Setting up db4.2-util (4.2.52+dfsg-5) ...
    home@server:~$ sudo db4.2_load -T -t hash -f logins.txt /etc/vsftpd/vsftpd_login.db
    home@server:~$ sudo chmod 600 /etc/vsftpd/vsftpd_login.db
    home@server:~$ sudo chmod 600 logins.txt
    home@server:~$ sudo nano /etc/vsftpd/ftp-users
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user1
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user2
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user3
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user4
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user5
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user6
    home@server:~$ sudo ln -s /etc/vsftpd/workers /etc/vsftpd/vusers/user7
    home@server:~$ sudo /etc/init.d/vsftpd restart
     * Stopping FTP server: vsftpd                                                                                                                        No /usr/sbin/vsftpd found running; none killed.
                                                                                                                                                   [ OK ]
     * Starting FTP server: vsftpd                                                                                                                 [ OK ] 
    home@server:~$ ftp localhost
    ftp: connect to address 127.0.0.1: Connection refused
    Trying 127.0.0.1...
    ftp: connect: Connection refused
    ftp>
    /etc/vsftp.conf file

    Code:
    listen=YES
    anonymous_enable=NO
    local_enable=YES
    write_enable=YES
    #local_umask=022
    #anon_upload_enable=YES
    #anon_mkdir_write_enable=YES
    #dirmessage_enable=YES
    use_localtime=YES
    xferlog_enable=YES
    connect_from_port_20=YES
    #chown_uploads=YES
    #chown_username=whoever
    #xferlog_file=/var/log/vsftpd.log
    #xferlog_std_format=YES
    #idle_session_timeout=600
    #data_connection_timeout=120
    #nopriv_user=ftpsecure
    #ftpd_banner=Welcome to blah FTP service.
    #deny_email_enable=YES
    #banned_email_file=/etc/vsftpd.banned_emails
    # chroot_list_enable below.
    # chroot_local_user=YES
    chroot_local_user=YES
    chroot_list_enable=NO
    #chroot_list_file=/etc/vsftpd.chroot_list
    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
    # Filezilla uses port 21 if you don't set any port
    # in Servertype "FTPES - FTP over explicit TLS/SSL"
    # Port 990 is the default used for FTPS protocol.
    # Uncomment it if you want/have to use port 990.
    #listen_port=990
    secure_chroot_dir=/var/run/vsftpd/empty
    pam_service_name=ftp
    rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    max_clients=2
    hide_ids=YES
    guest_enable=YES
    guest_username=ftp
    user_config_dir=/etc/vsftpd/vusers
    I see one item of concern. Maybe two...

    1. You have SSL enabled. If you have this type of connection then you have to supply that to using your ftp program. Doing a simple ftp o 127.0.0.1 to your server is a standard connection protocol (without ssl).

    I would make sure the server can accept connections before turning on SSL.

    2. It looks like, once you disable ssl, you will make the connection, but then you won't be able to modify or upload items to the ftp server directory. I believe this will occur because you are using the guest login type within your .conf file. The folders where each user has their items stored must be chown VSFTPD USER (replace VSFTPD USER with actual guest user, ftp in this case).


    There is an easier way to assign new users without having to create them in vsftpd virtual user space. I can help you with that once we figure the first two things out.
    My Ubuntu ran hosting
    Josh Design - Web Hosting

  8. #58
    Join Date
    Jan 2010
    Beans
    1

    Re: Howto: Easy FTP with vsftpd

    Hello,

    I´m searching since quite a while for a solution for my vsftp-server.

    I´m looking for a way to enable write access just for _one_particualar shared ftp folder, but afterwards the user is not allowed to delete his uploaded file.
    So the requirements are:
    1. permission to upload
    2. no permission to delete uploaded files.

    It looks like here are some vsftp-cracks around whith a solution!?

    Edit: Also a common linux solution could help to solve my problem!

    Thanks
    Tom
    Last edited by tmade; January 27th, 2010 at 02:09 PM.

  9. #59
    Join Date
    Dec 2008
    Beans
    7

    Re: Howto: Easy FTP with vsftpd

    hello,

    i installed ubuntu 9.10 server, but there's no libdb3-util that I could install? can someone please help me with this? thanks!
    (there's no libdbXXX-util, no matter which libdb version)

  10. #60
    Join Date
    Apr 2006
    Beans
    6

    Re: Howto: Easy FTP with vsftpd

    On Ubuntu 9.10, use db4.7-util instead of libdb3-util.

Page 6 of 14 FirstFirst ... 45678 ... LastLast

Bookmarks

Posting Permissions

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