CentOS vsftpd quick Configuration tutorial

Source: Internet
Author: User
Tags auth ftp


Note: vsftpd configuration for local users based on nginx virtual FTP users.

After yum install vsftpd:

Clear vsftpd. conf and write the following content:

Listen = YES
Ftpd_banner = Technical-Support: QQ: 252872160 Email: root@upall.cn
Anonymous_enable = NO
Local_enable = YES
Local_umask = 022
Guest_enable = YES
Guest_username = nginx
Userlist_enable = YES
User_config_dir =/etc/vsftpd/vusers
Dirmessage_enable = YES
Xferlog_enable = YES
Xferlog_std_format = YES
Pam_service_name = vsftpd
Connect_from_port_20 = YES
Tcp_wrappers = YES
Pasv_enable = YES
Pasv_min_port = 5000
Pasvanderbilt max_port = 5500

FTP account permission. The file name is an FTP account:/etc/vsftpd/vusers/ftpUser

Local_root =/data/web/ftpUser

Anon_umask = 077
Write_enable = YES
Anon_world_readable_only = NO
Anon_upload_enable = YES
Anon_mkdir_write_enable = YES
Anon_other_write_enable = YES

FTP account:/etc/vsftpd/vusers.txt


FtpUser

FtpPassword

Script used to add an FTP account:/etc/vsftpd/makeFtpDb. sh

#! /Bin/bash
Db_load-T-t hash-f/etc/vsftpd/vusers.txt/etc/vsftpd/vusers. db
Chmod 600/etc/vsftpd/vusers. db
./MakeFtpDb. sh will generate vusers. db after execution

Add all comments and add only the following two rows:/etc/pam. d/vsftpd

##% PAM-1.0
# Session optional pam_keyinit.so force revoke
# Auth required pam_listfile.so item = user sense = deny file =/etc/vsftpd
# Auth required pam_shells.so
# Auth include password-auth
# Account include password-auth
# Session required pam_loginuid.so
# Session include password-auth
Auth required/lib/security/pam_userdb.so db =/etc/vsftpd/vusers
Account required/lib/security/pam_userdb.so db =/etc/vsftpd/vusers

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.