My last article was about the installation of vsftp server in CentOS, and here is the detail on how you can make ftp users in it.
You can create users in linux using useradd command, however this user is not allowed to use ftp unless you configure it in vsftp configuration.
Step: 1
Edit vsftpd.conf, here is one my my servers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 anon_upload_enable=NO anon_umask=077 dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=YES chown_uploads=YES chown_username=daemon xferlog_file=/var/log/vsftpd.log xferlog_std_format=YES idle_session_timeout=300 data_connection_timeout=120 async_abor_enable=NO ascii_upload_enable=NO ascii_download_enable=NO ftpd_banner=Welcome on the FTP server. chroot_local_user=NO chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list ls_recurse_enable=YES pam_service_name=vsftpd userlist_enable=YES listen=YES tcp_wrappers=YES |
Step: 2
Create vsftpd.chroot_list in /etc
1 |
# nano /etc/vsftpd.chroot_list |
and add the user in it which you want to allow ftp
1 |
testuser |
Step: 3
Restart vsftp
1 |
# service restart vsftpd |
Now your user “testuser” is able to access his file using ftp.
Comment Policy:
Your words are your own, so be nice and helpful if you can. Please, only use your real name, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.