# setting up a ftp server #
# http://vpslife.blogspot.com/ & http://vpswatch.com/
#################################################
wget ftp://vsftpd.beasts.org/users/cevans/vsftpd-2.2.0.tar.gz
tar zxvf vsftpd-2.2.0.tar.gz
cd vsftpd-2.2.0
make
adduser nobody
adduser: user nobody exists
mkdir /var/ftp/(the next two are useful to run even if the user "ftp" already exists).
useradd -d /var/ftp ftp
chown root.root /var/ftpInstall vsftpd config file, executable, man page, etc.
chmod og-w /var/ftp
make install# open conf file and edit
cp vsftpd.conf /etc
vi /etc/vsftpd.conf# set anonym ftp to no!
anonymous_enable=NO# set local users can login and uncomment
local_enable=YES# set write enable to yes and uncomment
write_enable=YES#other settings
local_umask=022
connect_from_port_20=NO
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
##save file
#add users that you want enable ftp
vi /etc/vsftpd.chroot_list#I added two user
www-data#add following lines to pam file
mustafat
vi /etc/pam.d/vsftpd
# Standard behaviour for ftpd(8).
auth required pam_listfile.so item=user sense=allow file=/etc/vsftpd.chroot_list onerr=fail# to add to start up
# Note: vsftpd handles anonymous logins on its own. Do not enable
# pam_ftp.so.
# Standard blurb.
@include common-account
@include common-session
@include common-auth
auth required pam_shells.so
account required pam_unix.so
session required pam_unix.so
vi /etc/rc.local# add following line
/usr/local/sbin/vsftpd &
Reference : ftp://vsftpd.beasts.org/users/cevans/untar/vsftpd-2.2.0/INSTALL
Why Vsftp: Its fast and secure!
No comments:
Post a Comment