VSFTPD's rookie piece.

Source: Internet
Author: User

Installation of the VSFTP server

Installing a software is really not to be introduced here, therefore, the installation here is mainly for the primary configuration of the VSFTPD server.

This is my rookie to learn Linux wrote the first article, is the basis of the application of the FTP set up, if I write any questions please advise, I will continue to come out of the next step of the FTP in a variety of detailed configuration with everyone to discuss. I am using the Redhat Linux as + vsftpd-1.2.0-4 system architecture, which illustrates that if the configuration file is not very familiar, it is best to do a backup to avoid misoperation:

Anonymous server connection (standalone server)

Add the following items to the/etc/vsftpd/vsftpd.conf configuration file:

 anonymous_enable=yes (允许匿名登陆)
 dirmessage_enable=yes (切换目录时,显示目录下.message的内容)
 local_umask=022 (FTP上本地的文件权限,默认是077)
 connect_form_port_20=yes (启用FTP数据端口的数据连接)*
 xferlog_enable=yes (激活上传和下传的日志)
 xferlog_std_format=yes (使用标准的日志格式)
 ftpd_banner=XXXXX (欢迎信息)
 pam_service_name=vsftpd (验证方式)*
 listen=yes (独立的VSFTPD服务器)*

Function: can only connect FTP server, cannot upload and send down

Note: All of which are related to the log welcome information is optional, the asterisk is no matter what account to add, is the basic FTP option

Turn on anonymous FTP server upload permissions

Add the following information to the configuration file:

 Anon_upload_enable=yes (开放上传权限)
 Anon_mkdir_write_enable=yes (可创建目录的同时可以在此目录中上传文件)
 Write_enable=yes (开放本地用户写的权限)
 Anon_other_write_enable=yes (匿名帐号可以有删除的权限)
To turn on permissions under anonymous server

Add the following information to the configuration file:

 Anon_world_readable_only=no

Note: To note the properties of the folder, the anonymous account is another (other) user to open its read and write permission to execute

(R) Read-----down (W) write----upload (X) execution----If you do not open the FTP directory will not go

Normal User FTP server connection (standalone server)

Add the following information to the configuration file:

 Local_enble=yes (本地帐户能够登陆)
 Write_enable=no (本地帐户登陆后无权删除和修改文件)

Function: Can log on to VSFTPD server with local account, have permission to download and upload

Note: Anonymous servers can still log on without anonymous login, but not above

User login restricted to other directories, only into its home directory

Set all local users to perform chroot

 Chroot_local_user=yes (本地所有帐户都只能在自家目录)

Set the specified user execution chroot

 Chroot_list_enable=yes (文件中的名单可以调用)
 Chroot_list_file=/任意指定的路径/vsftpd.chroot_list

Note: Vsftpd.chroot_list is not created need to add their own, to control the account directly in the file add an account can

Restrict local user access to FTP  Userlist_enable=yes (用userlistlai 来限制用户访问)
 Userlist_deny=no (名单中的人不允许访问)
 Userlist_file=/指定文件存放的路径/ (文件放置的路径)

Note: Open userlist_enable=yes Anonymous account cannot log in

Security options  Idle_session_timeout=600(秒) (用户会话空闲后10分钟)
 Data_connection_timeout=120(秒) (将数据连接空闲2分钟断)
 Accept_timeout=60(秒) (将客户端空闲1分钟后断)
 Connect_timeout=60(秒) (中断1分钟后又重新连接)
 Local_max_rate=50000(bite) (本地用户传输率50K)
 Anon_max_rate=30000(bite) (匿名用户传输率30K)
 Pasv_min_port=50000 (将客户端的数据连接端口改在
 Pasv_max_port=60000 50000—60000之间)
 Max_clients=200 (FTP的最大连接数)
 Max_per_ip=4 (每IP的最大连接数)
 Listen_port=5555 (从5555端口进行数据连接)
See who landed the FTP and killed it in the process  ps –xf |grep ftp
 kill 进程号



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.