Page 1 of 2 12 LastLast
Results 1 to 10 of 53

Thread: [HOWTO] Sharing files with vsftpd ftp server

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Beans
    30

    [HOWTO] Sharing files with vsftpd ftp server

    Vsftpd is the most easy ftp server to setup.

    Installing vsftpd:
    Code:
    sudo apt-get install vsftpd
    The configuration file for vsftpd is located in /etc/vsftpd.conf. The default configuration is a little bit paranoid, not so usable for file sharing. So use this configuration instead:
    Code:
    # Put in /etc/vsftpd.conf
    # Don't forget to change samurai into your local username
    listen=YES
    anonymous_enable=YES
    local_enable=YES
    write_enable=YES
    anon_upload_enable=YES
    anon_mkdir_write_enable=YES
    dirmessage_enable=YES
    xferlog_enable=YES
    connect_from_port_20=YES
    chown_uploads=YES
    chown_username=samurai
    ftpd_banner=Welcome to blah FTP service.
    secure_chroot_dir=/var/run/vsftpd
    pam_service_name=vsftpd
    rsa_cert_file=/etc/ssl/certs/vsftpd.pem
    anon_root=/home/ftp
    Don't forget to backup before you use this configuration.
    Code:
    sudo cp /etc/vsftpd.conf /root/
    Now we must make writable directory for anonymous user.
    Code:
    cd /home/ftp
    sudo mkdir opendir
    sudo chmod 777 opendir/
    Ok, I explain this. In my local system, I have user named 'samurai'. With this configuration, I can log into ftp server with local user, that is 'samurai'. 'samurai' can go anywhere, create files, delete files, etc as long as he has sufficient permission.

    With this configuration I can log into ftp server with anonymous user ( without username and password ). After logging in, the anonymous user jailed in /home/ftp directory ( pointed by anon_root ). I can't go outside. I can download files from /home/ftp directory but not create, delete anything from this directory. But I can write and delete files in opendir. If I write files in opendir or upload files in opendir, the files automatically belong to 'samurai' user.

    To run this server:
    Code:
    sudo /etc/init.d/vsftpd start
    To stop it:
    Code:
    sudo /etc/init.d/vsftpd stop
    To restart it:
    Code:
    sudo /etc/init.d/vsftpd restart
    Now it is usable for file sharing, right?!!!!

  2. #2
    Join Date
    Nov 2004
    Beans
    473

    Re: [HOWTO] Sharing files with vsftpd ftp server

    Is is necessary to make any changes to /etc/inetd/inetd.conf?

    e.g
    ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/vsftpd
    Ubuntu User number is # 33337, Linux Registered User #531864, Boot info script, Wireless info script

  3. #3
    Join Date
    Jan 2005
    Beans
    30

    Re: [HOWTO] Sharing files with vsftpd ftp server

    I use vsftpd here as standalone daemon so I don't touch inetd.conf.

    Before configuring vsftpd itself, you must decide whether to run it as a standalone dæmon or by way of a super-server, inetd or xinetd. In previous versions of vsftpd, its developer recommended using it with xinetd due to xinetd's logging and access-control features. However, vsftpd versions 1.2 and later have native support for most of those features. For this reason, Evans now recommends that vsftpd be run as a standalone dæmon. In addition, a performance cost is associated with using inetd or xinetd. The cost isn't warranted if your system is to be a dedicated FTP server or if you anticipate FTP comprising a significant percentage of your system's activity.

  4. #4
    Join Date
    Nov 2004
    Beans
    473

    Re: [HOWTO] Sharing files with vsftpd ftp server

    Quote Originally Posted by merinda
    I use vsftpd here as standalone daemon so I don't touch inetd.conf.

    Before configuring vsftpd itself, you must decide whether to run it as a standalone dæmon or by way of a super-server, inetd or xinetd. In previous versions of vsftpd, its developer recommended using it with xinetd due to xinetd's logging and access-control features. However, vsftpd versions 1.2 and later have native support for most of those features. For this reason, Evans now recommends that vsftpd be run as a standalone dæmon. In addition, a performance cost is associated with using inetd or xinetd. The cost isn't warranted if your system is to be a dedicated FTP server or if you anticipate FTP comprising a significant percentage of your system's activity.
    Thanks Merinda.

    I was surprised at how simple it was to install and setup! <5mins!!

    In the long run it could be a standalone server, but at the moment I'm just trying things out.

    Would it be possible to add some example upload and down ftp session output to this howto?
    Ubuntu User number is # 33337, Linux Registered User #531864, Boot info script, Wireless info script

  5. #5
    Join Date
    Oct 2004
    Location
    Barcelona, Spain
    Beans
    191
    Distro
    Ubuntu Development Release

    Re: [HOWTO] Sharing files with vsftpd ftp server

    I wouldn't suggest to set write_enable=YES unless you explain people what it does.

    -------------------------------------
    Ubuntu in Spanish is Ubuñtu!
    Running Aspire 9814 AMD64 & Extensa 5620

  6. #6
    Join Date
    Jan 2005
    Beans
    30

    Re: [HOWTO] Sharing files with vsftpd ftp server

    Code:
    I wouldn't suggest to set write_enable=YES unless you explain people what it does.
    He he, I should have to write that this is for sharing files where you can read and write. As I remembered, the default configuration can get you share files with people, only it's very limited. Only anonymous.

    Code:
    Would it be possible to add some example upload and down ftp session output to this howto?
    I don't understand your statement.

  7. #7
    Join Date
    Jul 2005
    Location
    Rotterdam, NL
    Beans
    443

    Re: [HOWTO] Sharing files with vsftpd ftp server

    When trying to open vsftpd through the terminal I get
    Code:
    gabriel@ubuntu:~$ sudo vsftpd
    500 OOPS: could not bind listening IPv4 socket
    gabriel@ubuntu:~$
    Whatwhat?

    G
    The first thing we do, let's kill all the lawyers.
    Shakespeare, "Henry VI", Part IV

  8. #8
    Join Date
    Feb 2006
    Beans
    2

    Re: [HOWTO] Sharing files with vsftpd ftp server

    I have copied the example exactly and only changing the samurai to my user.
    I cannot download files from the internet using internet explorer.
    Using Passive makes no difference.
    I have stopped, started, restarted and reloaded. All to no avail.

    But i did learn the start | stop | restart AND reload options for
    sudo /etc/init.d/vsftpd *option*

  9. #9
    Join Date
    Sep 2005
    Location
    Montreal, Canada
    Beans
    16
    Distro
    Dapper Drake Testing/

    Re: [HOWTO] Sharing files with vsftpd ftp server

    1) What if i want to share folders that are not under /var/ftp? Can I just symlink to them?

    2) And how can I enable secure ftp on this setup (SSL)?

  10. #10
    Join Date
    Apr 2006
    Beans
    1

    Re: [HOWTO] Sharing files with vsftpd ftp server

    After reading the HOW-To for VSFTPD I am still having trouble understanding some of the concepts. As I am a relative Linux newbie, I am finding it difficult understand the various guides on VSFTPD that are out there.

    I have installed VSFTPD and can start and stop the server as well as connect to it anonymously. However, I am not sure how I setup the server to:

    1) Disallow anonymous access
    2) Allow access to specific (external) users only. (In this regard, how and where to setup the users i.e. are the users added as local users in the OS?)
    3) Set passwords for the users
    4) Set a common FTP directory for all users that is on a different hard disk than the one on which the Ubuntu OS is installed
    5) Allow users read access only

    I would greatly appreciate help with regard to to the above questions.

Page 1 of 2 12 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
  •