FTP

 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
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
User "user" has access to its home directory only, but if you want to open more directories you can do so by adding symlinks. For example you want to share a folder /files with user "user":

ln -s /files /home/user

Now we have a folder /home/user/files which is actually a link to /files. Now set permitions to the folder /files. In order to grant full access to this folder issue following:

chmod 777 /files

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.

 

Was this answer helpful?

 Print this Article

Also Read

nginx

How to install nginx on Centos Add nginx repo first. To add it, create the file...

Oracle 11g EX on Centos 6 x64 vps

We describe how to install Oracle 11g Express on Centos 6 x86_64 Openvz VPS. First of all you...

Backup script sample

#!/bin/bash echo "packing files in progress..." tar -cf /home/backup/root_lib-$(date...

Configure OpenVPN client on Windows

How to configure OpenVPN client on Windows: First download and install the client. Then...

Clear swap in Centos

Print memory usage [root@localhost]# free -m              total       used       free...