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

FTP file server

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

Share

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

FTP (File transfer Protocol) is a typical application layer protocol of CCMUP S structure. It needs server software and client software to realize file transfer function. FTP can download, view, modify, upload, delete and other operations of files. FTP is divided into anonymous access, authentication access, blacklist and whitelist, and virtual account login operations.

This lab requires a linux server (rh7-2), a Windows client (win7-1), and remote login to rh7-2 using Xshell.

Anonymous access

First mount the CD:

Install vsftpd:

Enable the vsftpd service:

Turn off the firewall:

Win7-1 settings:

The IP address is on the same network segment as the linux server

Ftp is followed by the address of the linux server

An anonymous user is ftp:

Create a file under ftp:

Download it on Win7:

Modify the configuration file:

Enable the function:

Restart the service:

Modify pub permissions (upload files under pub):

Create a 222.txt file in linux and download it in win7:

Upload under the pub directory:

Authentication access

Create zhangsan and lisi users:

Edit the configuration file:

Enable the function of imprisoning local users, so that users can only operate under their own home directory:

Restart the service:

Zhangsan user login:

Lisi user login:

Lisi cannot switch directories at will:

Black and white list

The default in ftp is the blacklist, that is, the list cannot be logged in.

Add zhangsan users to user_list:

Edit the configuration file:

Open the user list:

Restart the service:

Then it is found that zhangsan can log in, but lisi cannot:

Virtual account

Create a new directory: Vim / etc/vsftpd/vuser

Create a user name and password inside:

Convert to a database file:

Modify permissions:

Create a user to specify a home directory for vuser / opt/vuser and log in without using shell:

Edit pam authentication module to support the login of virtual users:

Add two lines under vi / etc/pam.d/vsftpd.vu:

Edit the configuration file:

Restart the service:

Log in with virtual users lisa and tom:

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