Tutorial: Installation and Configuration FTP Server in Linux Ubuntu Using ProFTPd

Monday, August 12, 2013

ProFTPd is an application that used to transfer data or familiar called as FTP (File Transfer Protocol). By using proFTPd, we can create an FTP server that can make a server can provide facilities to upload and download from the server.

ProFTPd is easy to configure. This step-by-step installation and configuration FTP server using proFTPd.


Installation ProFTPd:
  1. Install proftpd with the following command:
    sudo apt-get install proftpd
  2. While the installation process, you are given two options to running proFTPd from inetd or standalone. If FTP traffic is large, you must choose standalone. You mus create FTP user with the following commands for edit file:
    sudo nano /etc/shells
    Then add the following code:
    /bin/false
    Then create folder/directory what you want to share using FTP, for example: /home/ShareFTP. So you must type this command to create that directory:
    sudo mkdir /home/ShareFTP
  3. Create user and password with type this command:
    sudo useradd name_user -p password_user -d /home/ShareFTP -s /bin/false
    *name_user is username for account FTP server. password_user is password of that username.
  4. Then create 'download' and 'upload' directory into 'ShareFTP' with the following command:
    sudo mkdir /home/ShareFTP/download
    sudo mkdir /home/ShareFTP/upload
  5. Setting permission directory for user with the following command:
    sudo chmod 755 /home/ShareFTP
    sudo chmod 755 /home/ShareFTP/download
    sudo chmod 755 /home/ShareFTP/upload


Configuration ProFTPd:
  1. Edit configuration file /etc/proftpd/proftpd.conf using nano editor with this following way:
    sudo nano /etc/proftpd/proftpd.conf
  2. Will display the text editor of proftpd configuration, then put your cursor on the bottom line. Then add this script:
    <Anonymous /home/ShareFTP/>
    User nama_user
    Group nogroup
    UserAlias anonymous ftp
    DirFakeUser on ftp
    DirFakeGroup on ftp
    RequireValidShell off
    MaxClients 10
    DisplayLogin welcome.msg
    DisplayChdir .message
    <Directory *>
    <Limit WRITE>
    AllowAll
    </Limit>
    </Directory>
    </Anonymous>
  3. Save and restart proftpd service with the following command:
    sudo /etc/init.d/proftpd restart
  4. Configuration proFTPd has been completed. For transfer file from windows to linux server, you can run an application 'FileZilla', then fill with this configuration:
    hostname: alamat IP server
    username: username FTP
    password: password user FTP
    port    : 21

    or you can type ftp localhost in linux Terminal, then type username and password.


2 comments

  1. Why did you add "/bin/false" in "/etc/shells"

    ReplyDelete
    Replies
    1. Ive seen somewhere this tutorial in a forum.. maybe he just copy and paste

      Delete

 

Search This Blog

Follow My Twitter

Archives