Skip to main content

Install And Configure FTP Server On CentOS 7

VSFTPD(Very Secure File Transport Protocol Daemon) is a secure, fast FTP server for Unix/Linux systems. In this how-to article, let us see how to setup a basic FTP server on CentOS 7. However, this procedure might work well on RHEL CentOS, Scientific Linux 7 version too.

Install vsftpd

All commands should be run with ‘root’ user. Run the following command in terminal to install vsftpd package:
yum install vsftpd ftp -y
 
Edit vsftpd configuration file /etc/vsftpd/vsftpd.conf,
vi /etc/vsftpd/vsftpd.conf
Find the following lines and make the changes as shown below:
[...] ## Disable anonymous login ## anonymous_enable=NO
## Uncomment ##
 ascii_upload_enable=YES
ascii_download_enable=YES
 ## Uncomment - Enter your Welcome message - This is optional ##
 ftpd_banner=Welcome to UNIXMEN FTP service. ## Add at the end of this  file ##
 use_localtime=YES
Enable and start the vsftpd service:
systemctl enable vsftpd systemctl start vsftpd

Firewall And SELinux Configuration

Allow the ftp service and port 21 via firewall.
firewall-cmd --permanent --add-port=21/tcp
 firewall-cmd --permanent --add-service=ftp
Restart firewall:
firewall-cmd --reload
Then, update the SELinux boolean values for FTP service:
setsebool -P ftp_home_dir on

Create FTP users

By default, root user is not allowed to login to ftp server for security purpose. So, let us create a normal testing user called “sk” with password “centos”.
useradd sk passwd sk

Connecting to FTP server

Now, try to connect to FTP server itself with user “sk”:
ftp ipaddress
Enter the ftp user name and password.
Sample Output:
Connected to 192.168.1.101 (192.168.1.101). 220 Welcome to ftp service. Name (192.168.1.101:root): sk 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp>
Congratulations!! you will be able to login to FTP server without any problems.
 

Comments

Popular posts from this blog

How to remove zabbix-agent from Ubuntu 16.04 (Xenial Xerus)

Uninstall zabbix-agent To remove just zabbix-agent package itself from Ubuntu 16.04 (Xenial Xerus) execute on terminal: sudo apt-get remove zabbix-agent Uninstall zabbix-agent and it's dependent packages To remove the zabbix-agent package and any other dependant package which are no longer needed from Ubuntu Xenial. sudo apt-get remove --auto-remove zabbix-agent Purging zabbix-agent If you also want to delete configuration and/or data files of zabbix-agent from Ubuntu Xenial then this will work: sudo apt-get purge zabbix-agent To delete configuration and/or data files of zabbix-agent and it's dependencies from Ubuntu Xenial then execute: sudo apt-get purge --auto-remove zabbix-agent

Install Zabbix Agent on Suse Linux and Configure

Install taken from Suse –  http://software.opensuse.org/download/package?project=server:monitoring&package=zabbix-agent For SLE 12 SP1 run the following as root : zypper addrepo http://download.opensuse.org/repositories/server:monitoring/SLE_12_SP1/server:monitoring.repo zypper refresh zypper install zabbix-agent For SLE 12 run the following as root : zypper addrepo http://download.opensuse.org/repositories/server:monitoring/SLE_12/server:monitoring.repo zypper refresh zypper install zabbix-agent For SLE 11 SP4 run the following as root : zypper addrepo http://download.opensuse.org/repositories/server:monitoring/SLE_11_SP4/server:monitoring.repo zypper refresh zypper install zabbix-agent For SLE 11 SP3 run the following as root : zypper addrepo http://download.opensuse.org/repositories/server:monitoring/SLE_11_SP3/server:monitoring.repo zypper refresh zypper install zabbix-agent To configure the agent – Instructions taken from – https://www.zabbix.org/wiki

Zabbix alert Notification with Telegram

Zabbix Notifications with graphs in Telegram. Features  Graphs based on latest data are sent directly to your messenger  You can send messages both in private and group chats  Channels support  Saves chatid as a temporary file  Simple markdown and HTML are supported  Emoji in messages First of all : Nedd to install python (>3) on Cent os  # yum -y install python-pip # yum install -y https://centos7.iuscommunity.org/ius-release.rpm #  yum install -y python34u python34u-libs python34u-devel python34u-pi # yum -y install python-pip You need to install the  requests  module for python, this is required for operation! # pip install requests Put  zbxtg.py  in your  AlertScriptsPath  directory, the path is set inside your zabbix_server.conf (once confirm by zabbix server conf file ) Link to download ZBXTG.PY file  https://drive.google.com/open?id=0BxB8j19aCMZ8dFl1aHVuLVJyRjQ # cp zbxtg.py /usr/local/share/zabbix/alertscripts/ Create