Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of establishing Anonymous ftp access by using pure-ftpd under Linux

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

(1) use pure-ftpd to establish anonymous ftp access under ubuntu14.04

1. Installation

Apt-get install pure-ftpd

two。 Modify configuration

Nano / etc/pure-ftpd/conf/NoAnonymous

Change to no

3. Create an anonymous user

# create a ftp user

Sudo useradd ftp

# create a ftpgroup user group

Sudo groupadd ftpgroup

# add ftp users to the ftpgroup group

Sudo usermod-g ftpgroup ftp

# create a folder corresponding to ftp under / home

Cd / home

Mkdir ftp

# modify users and user groups of the ftp folder

Chown ftp:ftpgroup ftp

4. Restart pure-ftp

Service pure-ftpd restart

(2) use pure-ftpd to establish anonymous ftp access under CentOS 7

Pure-FTPd is an open source FTP service program on Linux.

The steps to install and configure Pure-FTPd on CentOS 7 are documented below.

1. Install the epel source:

Yum install epel-release

two。 Use the yum command to install Pure-FTPd:

Yum install pure-ftpd

3. Configure Pure-FTPd:

The location file is located at / etc/pure-ftpd/pure-ftpd.conf:

Edit:

Vim / etc/pure-ftpd/pure-ftpd.conf

Comment out PAMAuthentication yes

# PAMAuthentication yes

Change NoAnonymous to no

NoAnonymous no

4. Start the pure-ftpd service:

Systemctl enable pure-ftpd

Systemctl start pure-ftpd

5. Restart pure-ftpd

Systemctl restart pure-ftpd

6. Firewall and selinux configuration (Firewall And SELinux Configuration)

Allow ftp services and port 21 to traverse the firewall (Allow the ftp service and port 21 via firewall).

Firewall-cmd-permanent-add-port=21/tcp

Firewall-cmd-permanent-add-service=ftp

Restart the firewall (Restart firewall):

Firewall-cmd-reload

Update selinux (Then, update the SELinux boolean values for FTP service):

Setsebool-P ftp_home_dir on

Note: the anonymous ftp directory is / var/ftp

To add a FTP user:

# pure-pw useradd UserName-u User-g Group-d / path/to/ftp/dir

UserName:FTP user

System users, such as apache or www-data, need read and write access to the ftp directory.

System user groups, such as apache or www-data

/ path/to/ftp/dir:FTP directory

For example:

# pure-pw useradd ftptest-u apache-g apache-d / var/www/blog/ftp

Password encryption is saved in / etc/pure-ftpd/pureftpd.passwd

Save the Pure-FTPD user database:

# pure-pw mkdb

Make the added user effective:

# systemctl restart pure-ftpd

Now you can connect to the FTP server using the added fpt user and password.

The file transfer between FTP server and client is unencrypted and very insecure, especially sensitive information.

Referenc

Http://blog.topspeedsnail.com/archives/4306

Https://www.unixmen.com/install-configure-ftp-server-centos-7/

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report