Sunday, 12 April 2015

FTP Home Directory Access Configuration on RHEL7/CentOS7

Ftp Server IP Address:

Note : All commands are to be executed as 'root' user 

Ftp Server Configuration:

1) Install FTP Server

          sudo yum install -y vsftpd

2) Create user 'shabbir'
            sudo useradd shabbir
          sudo passwd shabbir

3) Create file in home directory for sharing
          sudo touch /home/shabbir/foo1

4) Configure  SELinux permission
             sudo setsebool -P ftp_home_dir on

5) Open ftp service in firewall
            sudo firewall-cmd --zone=public --add-service=ftp --permanent
            sudo firewall-cmd --reload   

 6) Start Service
               sudo systemctl start vsftpd

 7) Enable on boot
                sudo systemctl enable vsftpd

 Ftp Client Configuration:

1) Install FTP Client
          sudo yum install -y lftp

2) Check the connection
               lftp -u shabbir
                  lftp shabbir@> ls     
                  -rw-r--r--    1 1000     1000            0 Feb 10 12:16 foo1

No comments:

Post a Comment