Setting Up an FTP Access in Linux
FTP transfer or transferring via file transfer protocol is one of the most common methods on uploading your files to a server especially in web developing.

In paid shared hosting, most of the time these access is already open depending on the type of package you purchased. But, if you are starting and owning your own server, you might need to install some things and configure it in order for you to have this FTP access.

Here are the steps on setting up a FTP access to your server.

Setting Up a FTP Access in Linux

Note: That I'm using a Unix distro for this one, a different distro might have a different syntax and directory structure.

  1. Install a program called vsftpd
    sudo apt-get install vsftpd

  2. Check the configuration file of vsftpd after installation. File should be located at /etc/vsftpd.conf

    Remember that lines starting with a # sign means it is a comment.
    sudo vi /etc/vsftpd.conf

  3. For security purposes, disabled the anonymous access by setting the anonymous_enable to NO

  4. Allow local users to login. Change the local_enable to NO

  5. Restart the FTP server to enable these changes stated on step 3 and 4
    sudo /etc/init.d/vsftpd restart

The steps stated above will allow you to a read-only access the server files via FTP.

If you are going to transfer or write to the server you might get an error -- "550 Permission denied."

To fix this, simply open again the configuration file of vsftpd and look for this line, make sure it is not commented.

Then repeat step 5 to restart the FTP server.

No comments :

Post a Comment