1. Download the FTP Package:
root@www:~#
aptitude -y install vsftpd
or
apt-get install vsftpd
2. Now we configure our ftp server to suit the total LAMP:
root@www:~#
vi /etc/vsftpd.conf
# line 23: no anonymous
anonymous_enable=
NO
# line 26: uncomment ( allow local user )
local_enable=YES
# line 29: uncomment( writable )
write_enable=YES
# line 97,98: uncomment ( allow ascii mode )
ascii_upload_enable=YES
ascii_download_enable=YES
# line 117, 118: uncomment ( enable chroot )
chroot_local_user=YES
chroot_list_enable=YES
# line 120: uncomment ( specify chroot list )
chroot_list_file=/etc/vsftpd.chroot_list
# line 126: uncomment
ls_recurse_enable=YES
# add at the last line
# specify root directory ( if don't specify, users' home directory become FTP home directory)
local_root=public_html
# use localtime
use_localtime=YES
root@www:~#
vi /etc/vsftpd.chroot_list
# add users you allow to move over their home directory
mehedi
hasan
mithu
root@www:~#
/etc/init.d/vsftpd restart
Stopping FTP server: vsftpd.
Starting FTP server: vsftpd.
=====================================================================
But in our case we will configure it to support LAMP SERVER. so we will not specify
local_root=public_html(commented by #). So users' home directory will become FTP home directory.
=====================================================================
3.Now we will add user for each vhost decleared in Apache2 (i.e. LAMP Server)
# useradd -d /var/www/mehedi.com mehedi
# passwd mehedi
# chown mehedi:mehedi mehedi.com
# chmod 755 mehedi.com
Similarly
# useradd -d /var/www/hasan.com hasan
# passwd hasan
# chown hasan:hasan hasan.com
# chmod 755 hasan.com
root@www:~#
aptitude -y install vsftpd
or
apt-get install vsftpd
2. Now we configure our ftp server to suit the total LAMP:
root@www:~#
vi /etc/vsftpd.conf
# line 23: no anonymous
anonymous_enable=
NO
# line 26: uncomment ( allow local user )
local_enable=YES
# line 29: uncomment( writable )
write_enable=YES
# line 97,98: uncomment ( allow ascii mode )
ascii_upload_enable=YES
ascii_download_enable=YES
# line 117, 118: uncomment ( enable chroot )
chroot_local_user=YES
chroot_list_enable=YES
# line 120: uncomment ( specify chroot list )
chroot_list_file=/etc/vsftpd.chroot_list
# line 126: uncomment
ls_recurse_enable=YES
# add at the last line
# specify root directory ( if don't specify, users' home directory become FTP home directory)
local_root=public_html
# use localtime
use_localtime=YES
root@www:~#
vi /etc/vsftpd.chroot_list
# add users you allow to move over their home directory
mehedi
hasan
mithu
root@www:~#
/etc/init.d/vsftpd restart
Stopping FTP server: vsftpd.
Starting FTP server: vsftpd.
=====================================================================
But in our case we will configure it to support LAMP SERVER. so we will not specify
local_root=public_html(commented by #). So users' home directory will become FTP home directory.
=====================================================================
3.Now we will add user for each vhost decleared in Apache2 (i.e. LAMP Server)
# useradd -d /var/www/mehedi.com mehedi
# passwd mehedi
# chown mehedi:mehedi mehedi.com
# chmod 755 mehedi.com
Similarly
# useradd -d /var/www/hasan.com hasan
# passwd hasan
# chown hasan:hasan hasan.com
# chmod 755 hasan.com
No comments:
Post a Comment