Shammer's Philosophy

My private adversaria

Install vsftpd into Debian Squeeze

Install vsftpd

I use Debian Squeeze as server for test. I have no article about vsftpd so I write this article as my memo. The procedure to configure vsftpd is below.

  1. su -
  2. apt-get update
  3. apt-get install vsftpd
  4. edit /etc/vsftpd.conf
    1. comment out anonymous_enable=YES
    2. delete # at #local_enables=YES
    3. delete # at #write_enable=YES
    4. delete # at #ascii_upload_enable=YES
    5. delete # at #ascii_download_enable=YES
  5. /etc/init.d/vsftpd restart

My points are :

  • I would like to disable anonymous login
  • I would like to upload and download ascii files
  • I would like to use linux user already existed, like users which is created by useradd

Add ftp user

  1. su -
  2. useradd $FTP_USER_NAME
  3. usermod -d $FTP_ROOT_DIRECTORY $FTP_USER_NAME
  4. usermod -s /bin/bash $FTP_USER_NAME
  5. passwd $FTP_USER_NAME
  6. chown $FTP_USER_NAME $FTP_ROOT_DIRECTORY
  7. chgrp $FTP_USER_GROUP $FTP_ROOT_DIRECTORY if required

OR

  1. su -
  2. useradd -d $FTP_ROOT_DIRECTORY -s /bin/bash $FTP_USER_NAME
  3. passwd $FTP_USER_NAME
  4. chown $FTP_USER_NAME $FTP_ROOT_DIRECTORY
  5. chgrp $FTP_USER_GROUP $FTP_ROOT_DIRECTORY if required