FTP

From vpsget wiki
Revision as of 17:23, 2 September 2013 by Vq (talk | contribs)
Jump to: navigation, search

First of all make sure you have the ports 20-21 opened in your firewall. If not, you can do so with the following commands:

iptables -t filter -A OUTPUT -p tcp --dport 20:21 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 20:21 -j ACCEPT
service iptables save >/etc/sysconfig/iptables
service iptables restart

How to install ftp server on Centos.

Install ftp server:

yum install vsftpd

Edit the config file /etc/vsftpd/vsftpd.conf. It is recommended to set the following strings like shown below:

anonymous_enable=NO
ascii_upload_enable=YES
ascii_download_enable=YES

User root is not allowed to connect to ftp server by default for security reason. So create a new user, for example "user":

useradd user
passwd user

Enable vsftpd to start at boot

chkconfig vsftpd on

Start vsftpd service

service vsftpd start

Now your ftp server is operational and you can access it with ftp client like filezilla

How to install ftp server on Debian.

Install ftp server:

aptitude install proftpd

User root is not allowed to connect to ftp server by default for security reason. So create a new user, for example "user":

adduser user

Now your ftp server is operational and you can access it with ftp client like filezilla. Proftpd is set to start at boot by default.
In order to adjust the configuration to your needs, edit the /etc/proftpd/proftpd.conf file.

How to install ftp server on Ubuntu.

Install ftp server:

apt-get install vsftpd

If you're getting error:

root@test:~# apt-get install vsftpd
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package vsftpd

do following:

apt-get update

In order to adjust the configuration to your needs, edit the /etc/proftpd/proftpd.conf file. To allow anonymuos connections, edit following lines:

anonymous_enable=Yes
#local_enable=YES

To deny anonymous connections, edit following lines:

anonymous_enable=NO
local_enable=YES

To disable write-protection, uncomment following line:

write_enable=YES

In case when anonymous connections are disabled you should create a new user because user root is not allowed to connect to ftp server by default for security reason. To create a new user "user" enter the command:

adduser user

Now your ftp server is operational and you can access it with ftp client like filezilla. vsftpd is set to start at boot by default.