• Home
  • LLMs
  • Docker
  • Kubernetes
  • Java
  • Maven
  • About
Install | vsftpd (FTP server)
  1. References
  2. Installation
  3. Create an ftp administrator user
  4. /etc/vsftpd.conf
  5. Connecting to the server
  6. /etc/pam.d/vsftpd

  1. References
    See this page for more details on how to install vsftpd:
    https://help.ubuntu.com/community/vsftpd
  2. Installation
    Run the following command to install vsftpd:
    $ sudo apt install vsftpd

    Notes:
    The user 'ftp' and the group 'ftp' will be created.
    Also, the folder '/srv/ftp/' will be created.
  3. Create an ftp administrator user
    Create an ftp administrator user:
    $ sudo useradd admin1
    $ sudo passwd admin1
    $ sudo usermod --home /srv/ftp/ admin1
    $ sudo usermod -s /sbin/nologin admin1
    $ sudo usermod -a -G ftp admin1
    $ sudo chmod 775 /srv/ftp
  4. /etc/vsftpd.conf
    Modify the following settings in the file '/etc/vsftpd.conf' to enable write permissions:
    $ sudo vi /etc/vsftpd.conf
    write_enable=YES
    local_umask=022

    To allow just some users to login to the server, add the following settings in the file '/etc/vsftpd.conf':
    $ sudo vi /etc/vsftpd.conf
    userlist_deny=NO
    userlist_enable=YES
    userlist_file=/etc/vsftpd.allowed_users

    Create the file '/etc/vsftpd.allowed_users' and add the username of the users that can login to the server:
    $ sudo vi /etc/vsftpd.allowed_users
    admin1
  5. Connecting to the server
    Use FTP to connect to the server:
    $ ftp localhost

    You need to type your username and password:
    Connected to localhost.
    220 (vsFTPd 3.0.3)
    Name (localhost:mtitek): admin1
    331 Please specify the password.
    Password:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp>

    ftp> pwd
    Remote directory: /srv/ftp
  6. /etc/pam.d/vsftpd
    You might get an authentication error when trying to connect to the server.
    $ ftp localhost
    Connected to localhost.
    220 (vsFTPd 3.0.3)
    Name (localhost:mtitek): admin1
    331 Please specify the password.
    Password:
    530 Login incorrect.
    Login failed.
    ftp>

    If so, comment the following settings in the file '/etc/pam.d/vsftpd':
    $ sudo vi /etc/pam.d/vsftpd
    #auth   required        pam_shells.so
© 2025  mtitek