Install vsftp in Linux

Source: Internet
Author: User

1. For SSH and FTP, first install the server and then the client
2. Example: Install the vsftpd service
Step 1: first check whether vsftpd RPM packages have been installed
Rpm-Qa | grep vsftpd
Step 2: mount the ISO image to the hard disk
1. First, create a directory CDROM under the/Media Directory and mount the CD to the system/Media/CDROM.
Mkdir/Media/CDROM
Mount/dev/CDROM/Media/CDROM/
2. Enter the/etc/yum. Repos. d directory CentOS-Base.repo rename.

CD/etc/yum. Repos. d
MV CentOS-Base.repo CentOS-Base.repo.bak
VI CentOS-Media.repo
Change
Gpgcheck = 0
Enabled = 1

* ** 3. link all centos installation packages to/Media/centos.
Ln-S/Media/CDROM/centos // media/centos
Step 3:
Find the RPM package of vsftpd in the/Media/centos directory
Ls | grep vsftpd

After installation:
Rpm-IVH vsftpd .........

Step 4: Use chkconfig to check whether the service is loaded. chkconfig -- list | grep vsftpd
If it is loaded, check whether it is enabled at the running level. chkconfig -- level 5 vsftpd on
If it is not loaded, load it in. chkconfig -- add vsftpd
Step 5: Check whether the service is enabled
PS-Aux | grep vsftpd

Step 6:
If not, use the service vsftpd start command.

Step 7: setenforce 0 (Linux verification)

Step 8: Anonymous Logon
VI/etc/vsftpd. conf

Anonymous_enable = Yes
Anon_upload_enable = Yes
Non_mkdir_write_enable = Yes

After modifying the configuration file, you need to restart the service, service vsftpd restart

The public directory of the uploaded file is/var/FTP/pub.
Modify the/var/FTP/pub permission to 777 chmod 777/var/FTP/pub.

Step 9: Add a new account
Add a local FTP user
Some FTP servers require the user name and password to log on, because ftp users and permissions are set.
FTP users generally cannot log on to the system, but can only access the FTP server's own directory, which is for security. such a user is called a virtual user. in fact, it is not a real virtual user, but cannot log on to the shell, and cannot log on to the system.
 
/Usr/sbin/adduser-D/opt/test_ftp-g ftp-S/sbin/nologin Test
This command indicates:
Use the command (adduser) to add the test user. You cannot log on to the system (-S/sbin/nologin). Your own folder is in (-D/opt/test_ftp )), group FTP (-g ftp)
Then you need to set the passwd Test password for it.
In this way, an FTP user is added. The following example can help you access the FTP server.
 
[Root @ localhost FTP] # ftp
Ftp> open 192.168.0.33
Connected to 192.168.0.33 (192.168.0.33 ).
220 (vsftpd 2.0.5)
Name (192.168.0.33: GXL): Test
331 please specify the password.
Password:
230 login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
Ftp> quit
221 goodbye.
 
Note: If you encounter 500 Oops: cannot change Directory: You can enter
 
Setsebool ftpd_disable_trans 1
Service vsftpd restart Solution

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.