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.
Setting up FTP on CentOS VPS
Our CentOS servers come with VsFTP available to install from your onCloud Control Panel.
- Log into your myhosting.com onCloud(tm) Control Panel at https://manage.myhosting.com.
- If you have multiple VPS', find your VPS in the list and click Select.
- Navigate in the left navigation bar to VPS > VPS Management.
- Click the "Applications" tab.
- Click "Install"
- Find 'VsFTP' in the list of available packages. Put a check beside it and click "Submit".
|
Step 4. "Applications" tab
|
|
|
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.
- Log into Virtuozzo Power Panel (VZPP) for your VPS by logging into myhosting.com onCloud at https://manage.myhosting.com.
- Select your VPS if you have multiple navigate in the left navigation bar to VPS > VPS Management.
- Click on one of the login links provided to access VZPP.
- Once in VZPP, click File Manager.
- From the File Manager, navigate to /etc/vsftpd/ until you find
a file labelled "vsftpd.conf". Click the pencil icon beside this file.
- 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
- Again, all you need to do is remove the "#" from the beginning of the line and click Submit.
- 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".
- 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.
- 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.
- Log into your myhosting.com onCloud(tm) Control Panel at https://manage.myhosting.com.
- If you have multiple VPS', find your VPS in the list and click Select.
- Navigate in the left navigation bar to VPS > VPS Management.
- Click the "Applications" tab.
- Click "Install"
- Find 'ProFTP' in the list of available packages. Put a check beside it and click "Submit".
|
Step 4. "Applications" tab
|
|
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.
- Log into Virtuozzo Power Panel (VZPP) for your VPS by logging into myhosting.com onCloud at https://manage.myhosting.com.
- Select your VPS if you have multiple navigate in the left navigation bar to VPS > VPS Management.
- Click on one of the login links provided to access VZPP.
- Once in VZPP, click File Manager.
- From the File Manager, navigate to /etc/proftpd/ till you find
a file labelled "proftpd.conf". Click the pencil icon beside this file.
- In the file, find the line that appears:
# RequireValidShell off
- Remove the "#" from the beginning of the line and click Submit.
RequireValidShell off
- 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).