Linux builds FTP server and establishes anonymous user login

Source: Internet
Author: User
Tags ftp protocol yum repolist

FTP Service is a computer that provides file storage and access services on the Internet, and they provide services in accordance with the FTP protocol, which is a protocol designed to transfer files.

Things to prepare: vmware12,redhat7.0

1. Install the FTP service

Create multi-level catalogs: mkdir-p/media/cdrom

Mount Disc: Mount/dev/cdrom/media/cdrom

To configure the Yum Source:

Vim/etc/yum.repos.d/local.repo

Configuration content: "Redhat"

Name=redhat

Baseurl=file:///media/cdrom (the folder where the CD is mounted)

Enabled=1

Gpgcheck=0

Test Yum installation: Yum repolist

Install FTP service, VSFTPD service: yum-y install VSFTPD

Yum-y Install FTP

Firewall off: iptables-f

Service Save Iptables

2. Establish anonymous user Login

View Profile: vi/etc/vsftpd/vsftpd.conf

Backup to configuration file: Cp/etc/vsftpd/vsftpd.conf/etc/vsftpd/vsftpd.conf.bak

Choose to remove the contents of #: Grep-v "#"/etc/vsftpd/vsftpd.conf/etc/vsftpd/vsftpd.conf.bak

Restart service, set boot from: Systemctl restart VSFTPD

Systemctl Enable VSFTPD

To modify a configuration file:

Anonymous_enable=yes Allow anonymous Logins

anon_umask=022

Anon_upload_enable=yes Allow anonymous download

Anon_mkdir_write_enable=yes Allow anonymous file creation

Anon_other_write_enable=yes

Local_enable=yes Allow local user mode

Write_enable=yes Setting writable Permissions

local_umask=022 umask values for local user-created files

Dirmessage_enable=yes

Xferlog_enable=yes

Connect_from_port_20=yes

Xferlog_std_format=yes

Listen=no

Listen_ipv6=yes

Pam_service_name=vsftpd

Userlist_enable=yes

Tcp_wrappers=yes

Modify/var/ftp/pub file, Upload directory pub owner and group to Ftp:ls-ld/var/ftp/pub

chmod ftp:ftp/var/ftp/pub

View ftp about Status: Getsebool-a |grep FTP

Open ftpd_full_access Status: Setsebool-p ftpd_full_access=on

Enter the URL to enter the FTP service: FTP 192.168/198.134

Note:

There are two root in the directory where the VSFTPD server program is located, so it will be rejected before logging in

Delete the root user in/etc/vsftpd/user_list

Delete the root user in/etc/vsftpd/ftpusers

Linux builds FTP server and establishes anonymous user login

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.