#!/bin/bash
echo "--------------vsftpd install start ---------------"
echo "--------- By OuThink blog.offensive.cn -----------"

# Check if user is root
if [ $(id -u) != "0" ]; then
    echo "Error: You must be root to run this script"
    exit 1
fi

# Install vsftpd
yum install -y vsftpd
cd /etc/vsftpd
mv  vsftpd.conf  vsftpd.conf.bak
wget http://blog.offensive.cn/conf/vsftpd.conf
touch chroot_list
service  vsftpd start
chkconfig --level 35 vsftpd on