Install FTP server and configuration under Linux

Source: Internet
Author: User
Tags ftp access

Typically, uploading code, files to the server, vsftp or more. The following is the process of installing my configuration.
Linux system: centos6.6.
Installation Steps
1. Install vsftpd via Yum

[[email protected] ~]# yum -y install vsftpd

2. Set to boot

[[email protected] ~]# chkconfig vsftpd on

3. Remove the following lines of comments to allow their configuration to take effect:

local_enable=YESwrite_enable=YESlocal_umask=022chroot_local_user=YES      #这行可能需自己写pam_service_name=vsftpduserlist_enable=YES

4. After the configuration is saved, restart the VSFTPD service:

[[email protected] ~]# service vsftpd restart

adding users and additional configurations
1. Set the VSFTP account number.

    

2. Set the password for the added account

[[email protected] ~]# passwd 用户名根据提示操作

In this case, the basic VSFTPD service is configured. However, after the configuration is completed, the client will not be able to connect, the main should be the default firewall settings, the CentOS Firewall is not open FTP service, need to add modules and open 21 port to provide FTP access.
1. Add Ip_conntrack_ftp Module

[[email protected] ~]# vi /etc/sysconfig/iptables-config

Add the following line

IPTABLES_MODULES="ip_conntrack_ftp"

2. Open port 21

[[email protected] ~]# vi /etc/sysconfig/iptables

Add to

    -A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT

3. Restart Iptables to bring the new rules into effect

[[email protected] ~]# service iptables restart

To this, should be able to, if the software test connection process, when the user authentication occurred error 503, should be the problem of SELinux setup: You can use the following command to check

[[email protected] ~]#getsebool -a |grep ftpallow_ftpd_anon_write --> offallow_ftpd_full_access --> offallow_ftpd_use_cifs --> offallow_ftpd_use_nfs --> offallow_tftp_anon_write --> offftp_home_dir --> offftpd_connect_db --> offftpd_disable_trans --> offftpd_is_daemon --> onhttpd_enable_ftp_server --> off

This is the problem of selinux, we just open the value of the Ftp_home_dir is opened for On:,allow_ftpd_full_access also open together.

[[email protected] ~]#setsebool -P ftp_home_dir 1[[email protected] ~]#setsebool -P allow_ftpd_full_access 1

To this, the problem should be solved.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Install FTP server and configuration under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.