Saturday, September 23, 2017

How to config VSFTPD in CentOS

Step 1. Open your terminal
Step 2. Need to change admin mode
              $ su -
              Password: ("give your admin password")
Step 3. Want to install VSFTP before make sure if any previous install was made in that machine
             # rpm -q vsftpd
             if no previous vsftpd then

             # yum -y install vsftpd
             if completed

             # vim /etc/vsftpd/vsftpd.conf
             you want to do two more action here. un-command these two line, press i to modify.
         
             anonymous_enable=No
             chroot_local_user=Yes


#for using different direcotry    --- just add only one line >>local_root=/var/www/html
chroot_list_enable=yes
chroot_list_file=/etc/vsftpd/chroot_list
save the file
# useradd -d /var/www/html/ -s /sbin/nologin uatfileaccess
# passwd uatfileaccess
# vi /etc/vsftpd/chroot_list
   #ftp user list
   uatfileaccess
   save
#groupadd uatfileaccess
# chown root:uatfileaccess /var/www/html/
# chmod -R 777 /var/www/html/
# usermod -G uatfileaccess uatfileaccess
# cat /etc/group
mysql:x:27:
uatfileaccess:x:501:uatfileaccess
# service vsftpd restart

for aws ftp here
other directory for here











             press Esc, then
         
             :wq!

Step 4. Now you want create a specify user to access ftp file.
            #useradd ftpuser
            #passwd ftpuser
             password: ("give your ftpuser password at twice")
Step 5. Put the folder on your user account
            go to computer, file system,home, ftpuser
            if you want to change folder permission like

            #chmod -R 777 /home/ftpuser
       
            now you may paste specify folder inside your user folder
Step 6. Next start the vsftpd service like
       
            #service vsftpd start
            for permanent start like
            #chkconfig vsftpd on

Step 7. If you want to delete ftp user like
       
            #userdel ftpuser
       
            delete the ftpuser files
       
            #rm -rf /home/ftpuser

Create directory and texfile command
   #mkdir /home/ftpuser/ftpfile
   #touch /home/ftpuser/test

Want to remove VSFTPD
  #yum remove vsftpd



read write mode
sudo find /var/www/html -type d -exec chmod 755 {} \;

#chown ftp /var/www/html/
#chmod -R 777 /var/www/html

#vi /etc/vsftpd/vsftpd.conf

anon_upload_enable=YES
anon_mkdir_write_enable=YES

//enable these two lines

#service vsftpd restart

that's all




No comments:

Post a Comment