About vsftpd server:
vsftpd, (or very secure FTP daemon), is an FTP server for Unix-like systems, including Linux.
Service: vsftpd
Port: 20/21
Config File: /etc/vsftpd/vsftpd.conf
————————————————–
Embeded Security with vsftpd server
security options are already given in config file
pam_service_name=vsftpd
userlist_enable=YES <– control by /etc/vsftpd/userlist
tcp_wrappers=YES <–control by /etc/host.allow and /etc/host.deny
go to /etc/vsftpd
# vi /etc/vsftpd/userlist
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
———————————————————-
modify /etc/vsftpd/vsftpd.conf at the bottom of the file
pam_service_name=vsftpd
userlist_enable=YES
userlist_deny=NO <—place this file here
tcp_wrappers=YES
Note: userlist_deny=NO here means only allow users mentioned in the file /etc/vsftpd/userlist, if we modify like this
# vi /etc/vsftpd/userlist
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
#root
#bin
#daemon
#adm
#lp
#sync
#shutdown
#halt
#mail
#news
#uucp
#operator
#games
#nobody
vikas <—–comment all and placed this two lines
prabhat
this means, user prabhat and vikas can only use ftp service now, other users are denied. ( all users are allowed by default except root)
Other Securities
anonymous_enable=YES
local_enable=YES
anon_mkdir_write_enable=YES
we can control ftp by using this lines, enable disable anonymous ftp ( ftpd without username and password )
——————————————————————————-