Debian 6.0.6 Sqeeze Server FTP chroot :Basic configuration(see Description below)
Beware , this is no secure FTP configuration , cause it s a passwordless access anonymous and no encryption data transfer .
————————————————————————————————————-
Commands and configurations files :
1-apt-get install vsftpd
2-cp /etc/vsftpd.conf /etc/vsftpd.conf.bak
3-nano /etc/vsftpd.conf
my configuration file:
#listen_ipv6=YES
#vsftpd will run in standalone mode
listen=YES
#Allow anonymous FTP
anonymous_enable=YES
#if you want to enable users to upload data
#to the ftp server and create directory.
anon_upload_enable=YES
anon_mkdir_write_enable=YES
#Allow local users to log in.
local_enable=YES
#If you want to allow users to upload data
#to the vsftpd or create a directory.
write_enable=YES
dirmessage_enable=NO
local_umask=022
use_localtime=YES
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
connect_from_port_20=YES
ftpd_banner=Welcome to viafreekab FTP service.
#chown_uploads=YES
#chown_username=whoever
#idle_session_timeout=600
#data_connection_timeout=500
#nopriv_user=ftpsecure
#async_abor_enable=YES
#ascii_upload_enable=YES
#ascii_download_enable=YES
#deny_email_enable=YES
#banned_email_file=/etc/vsftpd.banned_emails
#chroot_list_enable=YES
#chroot_list_file=/etc/vsftpd.chroot_list
#To restrict local users to their home directories
#this is recommended for security.
chroot_local_user=YES
local_root=/srv/ftp/chrootdir
anon_root=/srv/ftp/chrootdir
secure_chroot_dir=/var/run/vsftpd/empty
#ls_recurse_enable=YES
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
————————————————————————————————————-
/etc/init.d/vsftpd reload
————————————————————————————————————
Creation pub file
root@vu:/srv# cd ftp
root@viafreekab:/srv/ftp# mkdir chrootdir
root@viafreekab:/srv/ftp# cd chrootdir
root@viafreekab:/srv/ftp/chrootdir# mkdir pub
————————————————————————————————————-
/etc/init.d/vsftpd reload
————————————————————————————————————
tail -f /var/log/vsftpd.log (logs file)
by Viafreekab
linux ftp server