Nov 102015
 

Setup FTP Linux

  • Install FTP
yum install vsftpd
  • Configure
vi /etc/vsftpd/vsftpd.conf

anonymous_enable=NO

vi /etc/selinux/config

SELINUX=disabled

Then run from command line:
 setenforce 0
chkconfig vsftpd on
  • Create User to access Apache home
useradd -g apache -d /var/www/html $khanhnn
passwd $khanhnn
  • Start Service
service vsftpd start
  • Set permissions
vi /etc/group

apache:x:##:$user

  • Set permissions in web root /var/www/html
chown -R $user:apache *
chmod -R 775 *

Now we need to restrict new ftp user to its home directory by changing the configuration file:

vi /etc/vsftpd/vsftpd.conf
uncomment
chroot_local_user=YES