Aliyun server installs ftp service, client FileZilla manages files

The server installs ftpd to provide access

We often need to deploy developed updates on the test server. It is more convenient to install an ftp tool to manage files. Now let's take a look at how to use FileZilla to connect to centos to manage files.

1. Check whether the Linux system has vsftpd software installed

Vsftpd is the abbreviation of "very secure FTP daemon", security is one of its biggest features. It is a completely free, open source ftp server software.

$ rpm -qa | grep vsftpd

does not output anything, you need to install

2. Install vsftpd

$ yum -y install vsftpd

3. Execute vsftpd

$ service vsftpd start

service vsftpd start run

4. Install FileZilla on mac to access Linux server

Search filezilla Chinese website to download and install, filezilla is an ftp tool for mac.
https://www.filezilla.cn/download/client

五、vsftpd 530 Permission denied

Unable to log in with root, 530 Permission denied
insert image description here

Modify the value of userlist_enable in the vsftpd configuration file to NO

$ whereis vsftpd
$ cd /etc/vsftpd
$ vi vsftpd.conf
# 加入以下3条配置
userlist_enable=NO
userlist_deny=NO
userlist_file=/etc/vsftpd/user_list
$ service vsftpd restart

Test the ftp login again, and at this time it prompts 530 Login incorrect
insert image description here

Check the contents of /etc/pam.d/vsftpd, one of which is

auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed

vsftpd pointed the forbidden list to /etc/vsftpd/ftpusers, so vi /etc/vsftpd/ftpusers found that root was on the list, then deleted root and saved it, and restarted vsftpd.

$ service vsftpd restart

Login to FTP successfully!

6. Add a new user and authorize it in CentOS 7

# 创建新用户
$ adduser wywar

# 修改新用户的密码
$ passwd wywar

authorized

Add sudoers file writable permission

$ chmod -v u+w /etc/sudoers

Modify the sudoers file

$ vi /etc/sudoers

Find the following location in the sudoers file and add the following content

## Allow root to run any commands anywhere
root    ALL=(ALL)    ALL
wywar   ALL=(ALL)    ALL

:wq save and exit

Take back the writable permission of the sundoers file

$ chmod -v u-w /etc/sudoers

7. Log in to ftp with a new user

Log in with a new user in filezilla
FileZilla App Icon

Guess you like

Origin blog.csdn.net/zhouweihua138/article/details/129542816