k0st1an.vsftpd

ansible-vsftpd

galaxy

This role installs the FTP server vsftpd.

Overview

  • Installs vsftpd
  • Supports virtual users with libpam-pwdfile
  • Enables TLS by default, allowing only secure connections
  • Create a list of users using the following format:
vsftpd_users:
  - username: k0st1an
    password: 42
  - username: johndoe
    password: pa55w0rd
    bindpath:
      - path: "/var/www/vhosts/example.com"
        owner: www-data
        group: www-data
      - path: "/var/www/vhosts/example.net"

Tested On

  • Debian Jessie
  • Ansible v1.9.1

Role Variables

Standard options are in vars/main.yml:

### vsftpd.conf settings

vsftpd_ftpd_banner: Welcome to FTP
vsftpd_max_per_ip: 100
vsftpd_pasv_min_port: 10000
vsftpd_pasv_max_port: 14000
vsftpd_xferlog_enable: 'YES'
vsftpd_local_root: /srv/ftp
vsftpd_ssl_enable: 'YES'
vsftpd_tls_only: 'YES'
vsftpd_user_config_dir: /etc/vsftpd.d
vsftpd_rsa_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem
vsftpd_rsa_private_key_file: /etc/ssl/private/ssl-cert-snakeoil.key
vsftpd_write_enable: 'YES'
vsftpd_pasv_enable: 'YES'
vsftpd_chmod_enable: 'YES'
vsftpd_file_open_mode: '0666'
vsftpd_local_umask: '0022'
vsftpd_utf8_filesystem: 'YES'
vsftpd_users: []

# Optionally enable file ownership changes on uploads. WARNING! 
# Proceed only if you understand the security risks!
# vsftpd_chown_uploads: 'YES'
# vsftpd_chown_username: 'www-data'

### end vsftpd.conf settings

vsftpd_pwd_file: /etc/vsftpd

vsftpd_test_user_is_enable: no
vsftpd_test_user: k0st1an
vsftpd_test_user_password: 42

You can also set these optional variables:

vsftpd_pasv_address: 52.17.204.30
vsftpd_pasv_addr_resolve: NO

For more details, refer to the vsftpd documentation.

License

MIT

Author Information

Command Line Interface

There is a script called vsftpd-user located in /sbin/. It can add, delete, update, and show a list of users.

$ /sbin/vsftpd-user

Usage vsftpd-user:
  add     <user name> <password> [<path to db file>]  # Add new user
  upgrade <user name> <password> [<path to db file>]  # Upgrade user password
  del     <user name> [<path to db file>]             # Delete user
  list    [<path to db file>]                         # Show users

Predefined variable:
  User DB: /etc/vsftpd
  Local root: /srv/ftp/    # User's directory location
Informazioni sul progetto

Install FTP server - vsftpd

Installa
ansible-galaxy install k0st1an.vsftpd
Licenza
mit
Download
354
Proprietario
Adapt or die