FTP Server built under Linux

Source: Internet
Author: User

Under Linux we use VSFTP as our FTP server.

Server Os:redhat 6.3

1. Check if VSFTPD is already installed on the server

Rpm-qa | grep vsftpd

2. If there is no corresponding vsftpd RPM package, we need to download the installation

Yum Install vsftpd

3. Configure the VSFTPD configuration file.

# ls/etc/vsftpd/
Ftpusers user_list vsftpd.conf vsftpd_conf_migrate.sh

Vim vsftpd.conf

The corresponding values are modified as follows:

Local_enable=yes #允许本地实体用户登录
Write_enable=yes #允许用户上传数据
local_umask=022 #建立新目录 (755) permission to file (644)
Dirmessage_enable=yes #若登录目录下有. Message displays the contents of the file and can create the. message file and write the information itself in the login directory
Xferlog_enable=yes #启动日志文件记录, recorded in/var/log/xferlog
Connect_from_port_20=yes #支持主动式连接功能
Xferlog_std_format=yes #支持WuFTP的日志文件格式
local_root=/home/xx/ftp #限制登录用户只能在/home/xx/ftp directory Operation
Chroot_local_user=yes #限制登录用户在主目录内local_root定义目录
Chroot_list Listen=yes #使用stand alone mode start VSFTPD
Userlist_enable=yes Account Login Control in the/etc/vsftpd/user_list file #支持
Firewall mechanism of Tcp_wrappers=yes #支持TCP wrappers

For the sake of security, we can edit the user_list file and add the account that is forbidden to log in to the system via FTP. In this case, these accounts try to log in remotely. will be denied login.

Give me a chestnut:

>FTP xxxxxxx

User (xxxxxx: (none)): Root
530 Permission denied.
Login failed.

I created a dedicated account TEST_FTP for FTP on the server, so I changed local_root=/home/xx/ftp to local_root=/in vsftpd.conf. Home/test_ftp/ftp

Files uploaded using the test_ftp account are then placed in the/home/test_ftp/ftp directory.

3. Restart the VSFTPD service and try to transfer the files using FTP.

Service VSFTPD Restart

4. Open the command line on another machine:

FTP xxxxxx

If the configuration goes well, you can now transfer files with FTP.

FTP Server built under Linux

Related Article

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.