60 Second Install. 3 – 2 – 1 – GO!
[raw]sudo apt-get install vsftpd[/raw] [raw]sudo nano /etc/vsftpd.conf[/raw]Uncomment the Following:
[raw]
write_enable=YES
local_umask=022
[/raw]
Add to end of the file:
[raw]# the list of users to give access
userlist_file=/etc/vsftpd.userlist
# this list is on
userlist_enable=YES
# It is not a list of users to deny ftp access
userlist_deny=NO[/raw]
Setup the user, replace /path/to/your/dir
[raw]useradd -d /path/to/your/dir -s /usr/sbin/nologin ftpuserpasswd ftpuser
chown -R ftpuser /path/to/your/dir
chmod 775 /path/to/your/dir
[/raw]
Add new user to vsftpd
[raw] nano /etc/vsftpd.userlist[/raw]Add “ftpuser” to this file
[raw]nano /etc/shells[/raw]Add “/usr/sbin/nologin” to this file
[raw]addgroup ftpuserssudo usermod -Gftpusers ftpuser
service vsftpd restart
[/raw]
BONUS:
You can chroot users by uncommenting this section of vsftpd.conf file:
[raw] chroot_local_user=YESchroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
[/raw]
Add “ftpuser” to this file
[raw]nano /etc/vsftpd.chroot[/raw]Questions? Hit up the comments.