Install VSFTPD under Linux

Source: Internet
Author: User

I. Installation of VSFTPD and related dependency packages

# VSFTPD installation program Yum Install vsftpd # VSFTPD Virtual login account must be dependent on package yum install pam* db4*

After installation, VSFTPD defaults to the/ETC/VSFTPD directory

Two. Modify Vsftpd.conf (/etc/vsftpd/vsftpd.conf)

#建立相关文件和文件夹touch/etc/vsftpd/Chroot_listmkdir/etc/vsftpd/ftplogin
#修改vsftpd. confcp/etc/vsftpd/vsftpd.conf/etc/vsftpd/vsftpd.conf.bakvim/etc/vsftpd/vsftpd.conf
#原有配置的修改anonymous_enable =nochroot_list_enable=yeschroot_list_file=/etc/vsftpd/CHROOT_LISTPAM_ Service_name=vvsftpd    #新增配置guest_enable =yesguest_username=wwwuser_config_dir=/etc/vsftpd/ FTPLogin     

The full configuration is as follows (the Gospel of the party), directly covered, do not forget to back up the original file

anonymous_enable=nolocal_enable=yeswrite_enable=yeslocal_umask=022dirmessage_enable=  yesxferlog_enable=yesconnect_from_port_20=yesxferlog_std_format=yeschroot_list_enable=  yeschroot_list_file=/etc/vsftpd/chroot_listlisten=yesuserlist_enable=yestcp_wrappers=  yesguest_enable=yesguest_username=wwwuser_config_dir=/etc/vsftpd/ftploginpam_service_name= VVSFTPD               

Three. Set up FTP virtual login account

1. Create a password plaintext file

touch/etc/vsftpd//etc/vsftpd/vuser

The format is:

User Name 1 username 1 password User Name 2 username 2 password .....

2. Generate a PAM checksum database file

- F /etc/vsftpd/vuser/etc/vsftpd/login.db

For security periods, it is recommended that the VUser file be deleted after the validation database is generated

or modify the VUser permissions so that other users do not read (the root of the great God if it is compromised, there is nothing to say)

chmod 600/etc/vsftpd/vuser

3. Add a new Pam service

touch/etc/pam.d//etc/pam.d/vvsftpd

The content is as follows (note that if it is a 32-bit system, use a 32-bit checksum, this example is 64-bit):

# %pam-1.0 # Auth required/lib/security/pam_userdb.so db=/etc/vsftpd/login # Account required/lib/security/pam_userdb.so db=/etc/vsftpd/loginauth SUFFICIENT/LIB64/SECURITY/PAM_ userdb.so db=/etc/vsftpd//lib64/security/pam_userdb.so db=/etc/vsftpd/login

4. Empowering FTP virtual users (add privilege profiles)

Configuration file storage path, is conf in the User_config_dir, this is/etc/vsftpd/ftplogin, the file name must be the same as the user name

File configuration in detail, the default path needs to be established in advance with mkdir, the directory owner is set to Conf in the Guest_username, this document is www

# have upload/download/Modify Permissions anon_world_readable_only=nowrite_enable=yesanon_mkdir_write_enable=  Yesanon_upload_enable=yesanon_other_write_enable=yeslocal_root=/u01/ftpb/upload/#  only upload/Modify permissions anon_world_readable_only=nowrite_enable=yesanon_mkdir_write_enable= yesanon_upload_enable=yeslocal_root=/u01/ftpb/upload/# only download permissions Anon_ world_readable_only=nolocal_root=/u01/ftpb/upload/

If there are 500 errors that cannot be displayed in the list, mainly iptables settings, please see the related article http://www.cnblogs.com/kreo/p/4368811.html

Install VSFTPD 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.