Practice of setting up FTP in Internet cafes (Linux)
Source: Internet
Author: User
Internet cafe FTP setup practice (Linux Version)-Linux Enterprise Application-Linux server application information, the following is a detailed description. In general, many people like to set up machines in windows. I used to use them too often, but I found that if I don't restart them, the machine will become better and slower. It often gets stuck, so I made up my mind to use Linux to set up an FTP server. Today I want to talk about using vsftpd to set up an anonymous server in Linux to enable Anonymous users to upload and download files, and local users.
I will not talk about how to install vsftpd, because some systems have customized software installation during installation, so it will be available by default after installation. Okay.
Add a user first. The name is nobody. I think everyone is familiar with this user. This is an anonymous user in Linux. Run the following command:
Adduser nobody to add this user, but the system displays adduser: user nobody exists to prove that the system already has this user. You do not need to add it. In addition, if the ftp server requires anonymous Users (anonymous) to add a user ftp, the default vsftp configuration also requires an empty directory (empty ), the absolute path of the directory should be/usr/share/empty/, and the absolute path of the FTP user/var/ftp.
Edit the configuration file. Edit the configuration file or use the vi editor. Vi/etc/vsftpd. conf. Back up the file before editing. My configuration file is as follows for your reference:
The detailed meaning of this Code. I have already explained it in my top posts. You can check it out.
This Code contains anonymous and local user uploads and downloads. However, a file is required for local user login.
There is a RedHat/vsftpd. pam Authentication file under the source code directory, copy it to/etc/pam. d/ftp
After copying, we can restart the FTP server. The service vsftpd restart
Our server is done like this!
Assume that a local user, test, logs on to FTP:
Ftp 127.0.0.1
Connected to 127.0.0.1 (127.0.0.1 ).
220 (vsFTPd 1.2.1)
Name (127.0.0.1: root): test
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
It looks good.
By default, anonymous users cannot upload files. But there is a solution.
Because vsftp is enabled
Anon_upload_enable = YES
Anon_mkdir_write_enable = YES
You are not authorized to upload files and create folders after logging on to the system with an anonymous account.
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