Saturday, September 26, 2015

Install VSFTPd In CentOS

Install VSFTPd In CentOS 


OS: CentOS 6.5 
Server IP: 124.124.124.150

1. Installations

yum install vsftpd ftp

2. Configure
vi /etc/vsftpd/vsftpd.conf

changed:

## Set to "NO" ##
anonymous_enable=NO

## Uncomment ##
ascii_upload_enable=YES
ascii_download_enable=YES

## Uncomment - Enter your Welcome message - This is optional ##
ftpd_banner=Welcome to SunRise FTP service..

chroot_local_user=YES

## Add at the end of this  file ##
use_localtime=YES


Start Services and turn on at start up
service vsftpd start
chkconfig vsftpd --list
chkconfig vsftpd on

useradd vannakk1
passwd vannakk1

Test FTP
ftp 124.124.124.150


** Probably you will get an error like “500 OOPS: cannot change directory”.
setsebool -P ftp_home_dir on

Allow port 20 and 21 in iptables

vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 20 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT

service iptables restart

setsebool -P allow_ftpd_full_access on
setsebool -P ftp_home_dir on

3. Test from Client

- Download ftp client and connect to server (FileZilla)

- Connect via browser
After loged in


Done,


#VSFTPd #CentOS #Vannakk

No comments:

Post a Comment