CentOSvsftpd-Linux Enterprise Application-Linux Server Application. Today, we have set up the ftp service as needed. here we need to note that there are differences between the redhat in centOS and linux. I have done and studied it myself, and I will talk about some of the learning points, if any error occurs, please advise;
First, set up the vsftpd service: the installation package.
Rpm-ivh/var/ftp/CentOS/vsftpd-2.0.5-12.el5.x86_64.rpm (the default path of the package is under/media/cdrom/CentOS/), just install
Because it was a virtual user, it went straight to the topic .. Haha
1. First, let's look at a text document. The odd lines are usernames and the even lines are passwords. Remember this.
From the beginning, I wrote lonin.txt, which is the name and password of our virtual account .,
Frank
Coolbar1 !. 0
Sanguo
Sanguo
2. Virtual users need a database transformation, dependent on package db4, db4-utils, db4-devel
Db4-devel-4.3.29-9.fc6
Db4-4.3.29-9.fc6
Db4-utils-4.3.29-9.fc6
3. convert our documents into databases .,, This is important
Db_load-T-t hash-f lonin.txt/etc/vsftpd/vsftpd_login.db
In this case, chmod 700/etc/vsftpd/vsftpd_login.db prohibits other users from viewing users in the database. Security is very important.
4. Add pam Authentication. Installation package required
Pam-devel-0.99.6.2-4.el5
Pam-0.99.6.2-4.el5
Pam_pkcs11-0.5.3-23
Edit/etc/pam. d/vsftpd.
[Root @ localhost ~] # Cat/etc/pam. d/vsftpd
# % PAM-1.0
Auth sufficient/lib/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login
Account sufficient/lib/security/pam_userdb.so db =/etc/vsftpd/vsftpd_login
These two lines are placed in the file header, and the parameters are different from those of linux redhat,
Create a virtual account, useradd-d/home/ftpsite/vritual
Note that the directory uploaded by your virtual account must be in home/ftpsite. Otherwise, you will be prompted for incorrect password or OPS error.
In this case, OK... The following is how to edit vsftpd. conf.
I will not explain the reason for editing the file ..
Then we need to edit the virtual account permissions in/etc/vsftpd/user_conf.
So my virtual user frank
Local_root =/home/ftpsite/SanGuo
Write_enable = YES
Anon_world_readable_only = YES
Anon_upload_enable = YES
Anon_mkdir_write_enable = YES
Anon_other_write_enable = YES
In this way, you can log on with the frank user.
[Root @ localhost user_conf] # ftp 192.168.2.46
Connected to 192.168.2.46.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (192.168.2.46: root): frank
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
In this case, OK. If you have any questions or do not have any effect, you can add the QQ group: 140704742
Thank you.
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