How to install vsftpd on CentOS
vsftpd stands for Very Secure File Transfer Protocol Daemon and it's a popular and well known FTP server for Unix-like (Linux,*BSD) operating systems.
In this tutorial we will cover how to install and configure vsftpd FTP server on CentOS 5-6.
Before getting started check:
- you already have CentOS Linux version 5 or 6 installed;
- you have an SSH access;
- your system is connected to the Internet;
Installing vsftpd
Run:
sudo yum install vsftpd
The above command will download the vsftpd from the CentOS repository and install it automatically.
Once the installation is completed, the default configuration file will be placed in /etc/vsftpd/ directory.
We need to make some changes in the default config file. Open the file in an editor. For example "nano":
sudo nano -w /etc/vsftpd/config
Add/uncomment what you need and leave the rest as it is:
anonymous_enable=NO local_enable=YES xferlog_enable=YES #Your logs will be written to /var/log/xferlog
To start the service and and to make it start on boot run:
sudo service vsftpd start sudo chkconfig vsftpd on
Check if the server started successfully:
ftp localhost
vsftpd: common problems
"500 OOPS: cannot change directory:/home/someuser" error
Most likely you have SELinux (Security Enhanced Linux - is a feature commonly enabled by default in the modern systems). There are two ways to deal with it: disable SELinux or configure it properly.
To disable SELinux open SELinux config file in an editor:
sudo nano -w /etc/selinux/configand change SELINUX=enabled to "disabled".
To configure SELinux properly run:
sudo setsebool -P ftp_home_dir on
Execution of this command may take some time to be completed, a minute or two, so wait until you get back to the prompt.
-
Bill Osborne2013-03-08 15:57:51
I did all the above but still got ftp: command not found wheni do ftp localhost. any suggestions?
-
Sergey2013-03-08 16:01:17
ftp is the client, vsftpd is the server. You need to install it with "yum install ftp"
Got a comment?
All Rights Reserved.