Results 1 to 3 of 3

Thread: Virtual Hosts and FTP

  1. #1
    Join Date
    Jun 2007
    Beans
    34

    Virtual Hosts and FTP

    I have an ubuntu server setup with virtual hosts running multiple domains on the same IP address.

    domain1.com
    domain2.com

    I have just configured FTP via VSFTPD and I am looking to only allow ftp to one site, and most preferable would be a subdomain of one site.

    Something like ftp.domain3.com

    How do I accomplish that?

  2. #2
    Join Date
    Aug 2007
    Beans
    237
    Distro
    Ubuntu

    Re: Virtual Hosts and FTP

    I would like to know that too, specify a user for a virtual site e.g. user1 is associated with the folder /var/www/domain.com/public_html

    Anyone?
    The quieter you become, the more you can hear

  3. #3
    Join Date
    Feb 2008
    Beans
    251
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Virtual Hosts and FTP

    Hi,

    This thread is over a year old, but here's how I would do it.


    Once you have VSFTP installed:

    1. edit "/etc/vsftp.conf" as the root user, changing/setting these options:

    Code:
    userlist_file=/etc/vsftpd.userlist
    userlist_enable=YES
    userlist_deny=NO
    2. create "/etc/vsftpd.userlist" and add the desired usernames to the file, each one on a separate line.

    Code:
    sudo nano /etc/vsftpd.userlist
    3. then use adduser to create unix users on the server:

    Code:
    sudo adduser --home /path/to/users/ftp/dir --shell /usr/sbin/nologin <username>
    replacing <username> with the name of the FTP user (which must match what you included in the /etc/vsftpd.userlist file). There is a series of questions, which are not too important, although including the user's real name can be useful in the future.

    4. finally, restart vsftpd:

    Code:
    sudo service vsftp restart
    And then test it!

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
  •