Records of vsftpd server Construction

Source: Internet
Author: User
Tags ftp login ftp transfer
The record for building a vsftpd server-Linux Enterprise Application-Linux server application information. The following is a detailed description. Yesterday, an ftp server was set up in the Organization. The vsftpd server was used because of the linux system used on the development server of the Organization. I found a lot of installation and configuration instructions on the Internet, which made me dizzy, and I wasted a lot of valuable youth because I didn't notice some details, especially at noon. Let's just summarize it, in case you don't know where to be confused next time when you encounter the same situation.

There are many documents for installing the vsftpd server on the Internet, but most of them are reprinted. Therefore, you can search for "vsftpd configuration" on google for more detailed instructions. My principle is to keep it as simple as possible and only record the steps I set up. Haha, it is good to set up. After all, I have never used ftp before.

1. Obtain vsftpd
VSFTP (Very Secure FTP Daemon, a Very Secure FTP Server) can be downloaded to the compressed package online. My next region is vsftpd-2.0.5.tar.tar.
2. Install vsftpd
Uncompress vsftpd-2.0.5.tar.tar with rootpermission,
# Tar zxvf vsftpd-2.0.5.tar.tar
Go to the vsftpd-2.0.5 directory and execute make, make install
3. Copy the configuration file
Several important configuration files need to be copied after installation.
1) cp vsftpd/usr/local/sbin/vsftpd
2) cp vsftpd. conf.5/usr/local/share/man/man5
3) cp vsftpd.8/usr/local/share/man/man8
4) cp vsftpd. conf/etc
4. modify the configuration file/etc/vsftpd. conf.
Open/etc/vsftpd in the editor. conf. Here is the configuration description of the vsftp server. All the items starting with "#" are watched out. You can open them according to the actual situation. For details, refer to other documents to view the meaning of each item, restart the server every time you modify it! Here we only set changes according to our company's requirements: (changes made on the basis of the original)
1) Anonymous logon to Anonymous_enable = NO is not allowed.
2) Local Users can log on to local_enable = YES
3) the local user can modify write_enable = YES.
4) Start the server listen = YES in standalone mode.
The other parts are opened in the original file, which only indicates the meaning:
Local_umask = 022 default umask code
Dirmessage_enable = YES: whether to display the directory description file. The default value is YES, but you need to close the work to create the. message file.

Xferlog_enable = YES whether to record the ftp Transfer Process

Connect_from_port_20 = YES Are you sure the port is transmitted from 20 (ftp-data)
5. Copy PAM
This step determines whether the local user can log on to the ftp
# Cp RedHat/vsftpd. pam/etc/pam. d/ftp
6. Create a user
All local users can log on to ftp (no ftp user and nobody need to be created). However, if you need to create an ftp user for a user who only allows login to ftp and does not allow login to the system, before that, it is best to create a specified directory for the user to access.
Mkdir/opt/user
Create a user that can only access ftp
Adduser-d/opt/user-g ftp-s/sbin/nologin user
-D: Specify/opt/user-g to add the user to the ftp group-s/sbin/nologin. logon to the system is not allowed.
Set User Password
Passwd user
Change directory access and read/write permissions
Chown user/opt/user
Chmod 755/opt/use
7. Start the server
/Usr/local/sbin/vsftpd &
Check the server process number.
Ps-ef | grep vsftpd

Other methods for anonymous login can be implemented by modifying the configuration file. In fact, anonymous login means that the user name and password are both ftp login.
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.