[Debian] Setting up an FTP Server on Linux VPS

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

 

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".

 

 

 

  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".

 

http://myhosting.com/kb/images/thumb/5/5f/VsFTP_1.jpeg/120px-VsFTP_1.jpeg

Step 3. VPS Management.

http://myhosting.com/kb/images/thumb/0/08/VsFTP_2.jpeg/120px-VsFTP_2.jpeg

Step 4. "Applications" tab

http://myhosting.com/kb/images/thumb/6/61/VsFTP_3.jpeg/120px-VsFTP_3.jpeg

Step 5. "Install"


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).

 

 

Was this article helpful?
0 out of 0 found this helpful