Browse
 
Tools Add
Rss Categories
-->

Setting up an FTP Server on Linux VPS

Reference Number: AA-00919 Created: 2012-09-20 13:25 Last Updated: 2013-02-14 19:32 0 Rating/ Voters

This guide is intended for advanced users with a myhosting.com Linux VPS users that do not have a control panel such as Plesk or cPanel/WHM. Those control panels install, run and manage FTP separately and FTP should be managed through those control panels if installed.

Novice users are highly recommended to switch to a VPS that includes either Plesk or cPanel for management of these kinds of services.

Contents

[hide]

Setting up FTP on CentOS VPS

Our CentOS servers come with VsFTP available to install from your onCloud Control Panel.

  1. Log into your myhosting.com onCloud(tm) Control Panel at https://manage.myhosting.com.
  2. If you have multiple VPS', find your VPS in the list and click Select.
  3. Navigate in the left navigation bar to VPS > VPS Management.
  4. Click the "Applications" tab.
  5. Click "Install"
  6. Find 'VsFTP' in the list of available packages. Put a check beside it and click "Submit".



The package will then be installed into your VPS along with all of the required dependencies. This may take a few minutes but you can click refresh to see the status.

Creating VsFTP Users

Log into your VPS with Putty or your preferred SSH tool as "root". Then, create a user named "testftp" with the following command:

adduser testftp

Use this command to setup a password for your new "testftp" user:

passwd testftp

This last command will disable shell access for the user (security precautions and highly recommended).

usermod -s /sbin/nologin testftp

Configuring VsFTP

VSFTP FAQ: ftp://vsftpd.beasts.org/users/cevans/untar/vsftpd-2.3.5/FAQ

TroubleShooting

CentOS Login Issues

On CentOS, the default VsFTP configuration will cause your first login to fail with 530 incorrect login error. To correct this, you need to adjust two lines in your VsFTP configuration file.

  1. Log into Virtuozzo Power Panel (VZPP) for your VPS by logging into myhosting.com onCloud at https://manage.myhosting.com.
  2. Select your VPS if you have multiple navigate in the left navigation bar to VPS > VPS Management.
  3. Click on one of the login links provided to access VZPP.
  4. Once in VZPP, click File Manager.
  5. From the File Manager, navigate to /etc/vsftpd/ until you find a file labelled "vsftpd.conf". Click the pencil icon beside this file.
  6. In the file, find the line that appears:
# chroot_list_enable=YES

Remove the "#" character from this line. Do the same for the following variables

# chroot_list_file=/etc/vsftpd/chroot_list


  1. Again, all you need to do is remove the "#" from the beginning of the line and click Submit.
  2. You then need to create and modify this /etc/vsftpd/chroot_list file to list your users that should have FTP access. From the File Manager in VZPP, make sure you're still at /etc/vsftpd/ and click "Create File".
  3. Name this new file "chroot_list" (without quotation marks) and enter in the body of the file "testftp" and click Submit. If you've added additional users, add each user to this list on a new line.
  4. Lastly, reboot your VPS and you should then be able to connect! Advanced users can simply restart VsFTPd from your Shell (Putty or other connection).



Setting up FTP on Debian or Ubuntu VPS

Our Debian & Ubuntu servers come with ProFTP available to install from your onCloud Control Panel.

  1. Log into your myhosting.com onCloud(tm) Control Panel at https://manage.myhosting.com.
  2. If you have multiple VPS', find your VPS in the list and click Select.
  3. Navigate in the left navigation bar to VPS > VPS Management.
  4. Click the "Applications" tab.
  5. Click "Install"
  6. Find 'ProFTP' in the list of available packages. Put a check beside it and click "Submit".


The package will then be installed into your VPS along with all of the required dependencies. This may take a few minutes but you can click refresh to see the status.

Creating ProFTP Users

Log into your VPS with Putty or your preferred SSH tool as "root". Then, use the below commands to create a user:

useradd userftp -p your_password -d /home/ftp -s /bin/false
passwd userftp

The above will create a user named "userftp" with the password you specify in the second step. Feel free to adjust the username as desired. It will also lock the user to the directory specified, in this case "/home/ftp". Again, this can be adjusted to your specifications.

Configuring ProFTP

There is alot that goes into maintaining even just FTP on a VPS, here's a link to common configurations on the ProFTP site: http://www.proftpd.org/docs/example-conf.html

TroubleShooting

Login Issues

On Debian or Ubuntu, the default ProFTP configuration will cause your first login to fail with 530 incorrect login error. To correct this, you need to adjust one line in your ProFTP configuration file.

  1. Log into Virtuozzo Power Panel (VZPP) for your VPS by logging into myhosting.com onCloud at https://manage.myhosting.com.
  2. Select your VPS if you have multiple navigate in the left navigation bar to VPS > VPS Management.
  3. Click on one of the login links provided to access VZPP.
  4. Once in VZPP, click File Manager.
  5. From the File Manager, navigate to /etc/proftpd/ till you find a file labelled "proftpd.conf". Click the pencil icon beside this file.
  6. In the file, find the line that appears:
# RequireValidShell        off
  1. Remove the "#" from the beginning of the line and click Submit.
RequireValidShell        off
  1. Lastly, reboot your VPS and you should then be able to connect! Advanced users can simply restart ProFTPd from your Shell (Putty or other connection).
Rss Comments
  • There are no comments for this article.
Info Add Comment
Nickname: Your Email: Subject: Comment:
Enter the code below: