VSFTP configuration manual

xiaoxiao2021-03-05  26

VSFTP is Very Security FTP, as the name suggests, very secure FTP server.

table of Contents

1 VSFTP server installation

1.1 Anonymous Server Connection (Separate Server) 1.2 Turn on Anonymous FTP Server Upload Limits 1.3 Opening the Permissions Uploaded by Anonymous Servers 1.4 Ordinary User FTP Server Connection (Separate Server) 1.5 User Login Limit into other directory, can only enter it Main Catalog 1.6 Limit Local User Access FTP1.7 Security Options 1.8 View who logs in FTP and kills its process

2 configuration of the VSFTP server

2.1 Configuring a local group Access FTP2.2 Configuring a Non-port Standard Mode for Server of Separate FTP for Data Connection 2.3 Configuring a separate virtual FTP, use virtual FTP users, and make different permissions in the four accounts

2.3.1 A: Configuring NIC 2.3.2 B: Write / etc / sysconfig (in order to restart IP address will not be lost) 2.3.3 C: Enter the folder in which vsftpd.conf is located 2.3.4 D: Create logins .txt2.3.5 E: Establish a visitor's password library file, then modify its permissions 2.3.6 f: Enable FTP.vu2.3.7 G in /etc/pam.d/: In / VAR / FTP / Create Directory and Change its attribute and its host 2.3.8 h: Enter vsftpd2.conf to modify the information 2.3.9 i: Create a Virtaul file directory in the directory where vsftpd.comf is located and created in the file directory named in your username. Profile 2.3.10 J: Modify vsftpd2.conf

2.4 All configuration information in vsftpd.conf

3 maintenance of VSFTP servers

4 additional supplements used by VSFTP

4.1 Supplement 1: How do I choose to limit the user in my catalog? 4.2 Supplement 2: Open the log function of the VSFTP server 4.3 Supplement 3: How to make the bind IP to VSFTP? 4.4 Supplement 4: How to make the VSFTP server limit the number of links, and the maximum number of links to each IP? ? 4.5 Supplement 5: How to limit the speed of download? 4.6 Supplementary Six: My hard disk is limited, what should I do? 4.7 Supplementary Seven: How to Customize Welcome Information 4.8 Supplement 8: How to implement a virtual path? 4.9 Supplement Nine: How to get anonymous access, upload, and support download and execute? 4.10 Supplement 10: Adding a virtual user 4.11 Adding Virtual User 4.11 Reix 11: How to start the system with Standalone boot to start with xinetd?

VSFTP server installation

Installing a software is not allowed here, so the installation here is primarily for the primary configuration of the VSFTPD server.

VSFTPD rookie

Copyright Notice: You can reprint anything, please be sure to indicate the original source and author information and this statement by hyperlink.

[Original article http://www.5ilinux.com/vsftp01.html]

This is the first article written by my rookie to learn Linux. It is the application of the basic FTP erection application. If I have any questions, please advise, I will continue to move in the FTP in various details. Configure to discuss with everyone. What I use is the system architecture of Redhat Linux as vsftpd-1.2.0-4, which illustrates if it is not very familiar with the configuration file, it is best to make a backup, so as not to operate:

Connection of anonymous servers (separate servers)

Add a few items in the /etc/vsftpd/vsftpd.conf profile:

Anonymous_enable = yes (Allow anonymous login) DirMessage_enable = YES (When switching the directory, display the contents of the directory. Message)

Local_umask = 022 (Local file permissions on FTP, default 077)

Connect_form_port_20 = yes (Enable data connection for FTP data port) *

Xferlog_enable = YES (Activate the log of uploading and the log)

Xferlog_std_format = yes (using standard log format)

ftpd_banner = xxxxx (welcome information)

PAM_SERVICE_NAME = VSFTPD (Verification Mode) *

Listen = YES (independent VSFTPD server) *

Function: You can only connect to the FTP server, you can't upload and submit: where all and log welcome information related to the option, the asterisk, no matter what account, you have to add, it is the basic option belonging to FTP.

Open anonymous FTP server uploading authority

Add the following information to the configuration file:

Anon_upload_enable = yes (open upload authority)

Anon_mkdir_write_enable = yes (can create a directory to upload files in this directory)

Write_enable = YES (Open Local User Write Permissions)

Anon_other_write_enable = yes (anonymous account can have permission to delete)

Open the permissions issued by anonymous server

Add the following information in the configuration file:

Anon_World_Readable_only = no

Note: Pay attention to the properties of the folder, an anonymous account is other (other) user to turn on its read and write permission (R) read ----- Upload (W) Write ---- Upload (X) Execution ---- If you don't open the directory of FTP, you can't get it.

Ordinary user FTP server connection (independent server)

Add the following information in the configuration file:

Local_enble = YES (local account can log in)

Write_enable = no (no right to delete and modify file after login)

Function: You can log in to the VSFTPD server with a local account, there is a permission to download upload Note: An anonymous server can be logged in after anonymous login, but can not be uploaded

User login restrictions into other directories, can only enter its home directory

Set all local users to perform chroot

Chroot_local_user = yes (all accounts can only be in their own directory)

Set the specified user to execute Chroot

Chroot_list_enable = yes (the list in the file can be called)

CHROOT_LIST_FILE = / Any specified path /VSFTPD.CHROOT_LIST

Note: vsftpd.chroot_list is not created, you need to add yourself, you want to control your account directly to add an account in the file.

Limit local users access FTP

UserList_enable = YES (with UserListLai to limit user access)

UserList_Deny = NO (people in the list are not allowed)

UserList_file = / Specifies the path to the file / (the path placed by the file)

Note: Open UserList_enable = YES Anonymous account cannot be logged in

Security Option Idle_Session_Timeout = 600 (second) (10 minutes after the user session is idle)

DATA_CONNECTION_TIMEOUT = 120 (seconds) (2 minutes to connect data)

Accept_timeout = 60 (seconds) (after passing the client 1 minute later)

Connect_timeout = 60 (seconds) (reconnected after 1 minute)

Local_max_rate = 50000 (Bite) (Local User Transfer Rate 50K)

Anon_max_rate = 30000 (Bite) (Anonymous User Transfer Rate 30K)

PASV_MIN_PORT = 50000 (transform the client's data connection port

PASV_MAX_PORT = 60000 50000-60000)

MAX_CLIENTS = 200 (the maximum number of ftps)

Max_Per_ip = 4 (maximum number of connections per IP)

Listen_Port = 5555 (data connection from the 5555 port)

View who landed FTP and killing its progress

PS -XF | GREP FTP

Kill process number

VSFTP server configuration

VSFTPD master articles

Copyright Notice: You can reprint anything, please be sure to indicate the original source and author information and this statement by hyperlink.

[Original article http://www.5ilinux.com/vsftp02.html]

I am not a master! ! ! ^ _ ^ I just a rookie, do my best to write the master articles I feel this rookie, so if there is any mistake, please refer to it! ! !

Environment: System architecture of Linux AS 3.0 vSFTPD-1.2.0-4 is under the standalone server! I hate xinetd ^ _ ^

Configure the FTP accessible for local groups

First create the main directory of user group TEST and FTP

GroupAdd Test

MKDIR / TMP / TEST

Then create a user

UserAdd -g test -d / tmp / test -m usr1

Note: g: The group of users d: indicates that the location of the creating the user's own directory is given

M: Do not build a default home directory, that is, there is no direct directory under / home.

UserAdd -g test -d / tmp / test -m usr2

Then change the owner and permissions of the folder

Chown usr1.test / tmp / test - "This means that the / TMP / TEST is the most USR1

CHMOD 750 / TMP / TEST ---- 7 indicates that WRX 5 indicates that the RX 0 does not have any permissions.

The purpose of this experiment is USR1 with permissions for uploading, deleting and downloading.

And USR2 only downloaded permissions without uploading and deleting permissions

Of course, don't forget our main configuration file vsftpd.conf

To determine local_enable = yes, write_enable = yes, chroot_local_usr = YES These three options are there!

Non-port standard mode for configuring independent FTP servers for data connection

This is very easy: in vsftpd. Add

Listen_Port = 33333

Yes!

Configure a separate virtual FTP, use virtual FTP users, and make different permissions in the four accounts.

(Two permissions with read directory, a permission with browsing, uploading, downloading, a permission with browsing, download, deletion, and change the writing name) A: Configuring the NIC

The first network card address is 10.2.3.4 mask is 255.255.0.0.0

IFConfig Eth0: 1 211.131.4.253 Netmask 255.255.255.0 Up

B: Write / etc / sysconfig (in order to restart, IP address will not be lost)

CD / ETC / Sysconfig / Network-scripts

CP ifcfg-eth0 IFCFG-ETH0: 1

VI ifcfg-eth0: 1 in it is modified as follows

Device = eth0: 1

Broadcast = 211.131.4.255

Hwaddr = MAC address of the NIC

Ipaddr = 211.131.4.253

Netmask = 255.255.255.0

NetWork = 211.131.4.0

Onboot = YES

TYPE = Ethernet

WQ exits

C: Enter the folder where vsftpd.conf is located

CP vsftpd.conf vsftpd2.conf

Modify vsftpd.conf Add the following information

Listen_address = 10.2.3.4

Modify vsftpd2.conf Add the following information

Listen_address = 211.131.4.253

FTPD_BANNER = this is a Virtual FTP TEST

This virtual FTP server is established.

D: Establish logins.txt

Vi /TMP/logins.txt

Add information:

Longlei ------------ User Name

Longlei ------------ password

ZhangWeibo

ZhangWeibo

Jinhui

Jinhui

LXP

LXP

In the format, follow me, a user name, a password.

E: Establish a visitor's password library file, then modify its permissions

DB_LOAD -T -T HASH -F /TMP/LOGINS.TXT / Etc/vsftpd_login.db

F: Enter ftp.vu in /etc/pam.d/

Add the following information to this file

Auth Required /Lib/security/pam_userdb.so db = / etc / vsftpd_login

Account Required /Lib/security/pam_userdb.so db = / etc / vsftpd_login

G: In / var / ftp / creation directory and change its properties and its homeowner

UserAdd -d / var / ftp / test qiang

CHMOD 700 / VAR / FTP / TEST

Add Test_File test files in the catalog

H: Enter vsftpd2.conf to modify the information

Listen_yes

Anonymous_enable = no

Local_enable = YES

Write_enable = no

Anon_upload_enable = no

Anon_mkdir_write_enable = no

Anon_other_write_enable = no

Chroot_local_user = yes

Guest_enable = yes ---------- Enperse virtual users

Guest_username = qiang ------ map virtual users to local users

Listen_Port = 5555

MAX_CLIENT = 10

MAX_PER_IP = 1

Ftpd_banner = this is a Virtual Server and Users

PAM_SERVICE_NAME = ftp.vu Note: The lower the permissions given in the primary configuration file, the larger the space for the permissions of the support when the user is managed later, because the highest restriction service of the main configuration file first reads the master profile, Then read the user's configuration file

Repeated service. It's just built in this virtual user.

I: Create a Virtaul file directory in the directory where vsftpd.comf is located and create a configuration file named by your username in the file directory.

Longlei ZhangWeiBo Jinhui LXP

Add:

Anon_World_Readable_only = no

Add in LXP

Anon_World_Readable_only = no

In this way, the two users have the right to browse the directory.

Add in jinhui

Anon_World_Readable_only = no

Write_enable = YES

Anon_upload_enable = yes

This user has permission for uploading, downloading and browsing.

Add from ZhangWeibo

Anon_World_Readable_only = no

Write_enable = YES

Anon_upload_enable = yes

Anon_other_write_enable = yes

This user has an upload, download, delete file directory, modify the file name and browse.

J: Modify vsftpd2.conf

Join user_config_dir = / vsftpd.conf directory / Virtual

The restart of the server is getting

All configuration information in vsftpd.conf

Parameters for vsftpd.conf:

When Anonymous_enable = yes to allow anonymous login Dirmessage_enable = yes switch directories, display .message content Local_umask local file directory permissions on 022FTP = default is 077 Connect_form_port_20 = yes enabled data FTP data port connection * Xferlog_enable = yes upload and activation log Xferlog_std_format pass = yes using a standard log format ftpd_banner = XXXXX welcome information pam_service_name = vsftpd authentication * Listen = yes independent vSFTPD server * Anon_upload_enable = yes open permission to upload anon_mkdir_write_enable = yes to create a directory at the same time can be uploaded in this directory open file write_enable = yes local users write permissions anon_other_write_enable = yes anonymous account can be deleted anon_world_readable_only = no permission to open anonymous users browse permissions ascii_upload_enable = yes to enable ASCII upload transmission ascii_download_enable = yes to enable downloading of ASCII transmission banner_file = / VAR / vSFTPD_BANNER_FILE User Connection Welcome Information Use the information in this file idle_session_timeout = 600 (second) User session Idle 10 minutes Data_connection_timeout = 120 (second) Connect the data connection free 2 minute break ACCEPT_TIMEOUT = 60 (second) The end is idle after 1 minute, and the connect_timeout = 60 (second) interrupt 1 minute after reconnecting local_max_rate = 50000 (Bite) Local User Transmission Rate 50K anon_max_rate = 30000 (Bite) Anonymous User Transmission Rate 30K PASV_MIN_PORT = 50000 Put the client's data connection port Changed in PASV_MAX_PORT = 6000050000-60000 between MAX_CLIENTS = 200FTP Max_Pr_IP = 4 Each IP Maximum Connection Listen_Port = 5555 Data Connection from 5555 Port Local_Enble = YES Local Account Login WRITE_ENABLE = NO Local account login No right to delete and modify the file below this is a set of chroot_local_user = YES Local all accounts can only call the list in the own directory chroot_list_enable = yes file can call chroot_list_file = / arbitrary path /VSFTPD.CHROOT_LIST premise Chroot_local_user = no This is another set of userlist_enable = YES in the specified file, the user cannot access UserList_deny = YESUSERLIST_FILE = / Specified path / VSFTPD.USER_LIST start single Banner_fail = / path / file name connection failure the contents Ls_recurse_enable = noAsync_abor_enable = yesone_process_model = yesListen_address = 10.2.2.2 virtual service will bind to a port guest_enable = yes virtual users can log guest_username = set by the user virtual user name mapped to local user user_config_dir =

/ Arbitrate Specified Path / For User Policy The folder of the user policy is specified in the path to different virtual user profiles is a set of chown_uploads = YES to change the owner of the upload file for root chown_username = root is also a group of de Neny_email_enable = Yes is allowed No anonymous users use certain mail addresses banned_email_file = // Any specified path / XX / is a single PASV_ENABLE = YES server side with passive mode user_config_dir = / arbitrary specified path // arbitrary file directory Specify virtual user storage configuration file Path VSFTP server maintenance

Now there is no information on maintaining the VSFTP server. Welcome everyone to edit 2

Some supplements used by VSFTP

Add 1: How do I choose to limit the user to my home directory?

We have to build a file yourself, in the / etc directory

#touch /etc/vsftpd.chroot_list

Benan and NANBEI are limited to their home directory, while other FTP users do not do this.

In the vsftpd.chroot_list this file, add Beinan and Nanbei to the line, pay attention, each user occupies a row.

Beinan

Nanbei

Then change the /etc/vsftpd/vsftpd.conf file, find the following two lines

# chroot_list_enable = yes

# chroot_list_file = / etc / vsftpd.chroot_list

Take the front ##, that is, this

Chroot_list_enable = yes

Chroot_list_file = / etc / vsftpd.chroot_list

If there is no such two lines, you can add it to you.

After setting up, re-vsftpd servers.

Supplementary Supplement: How to limit all FTP users in the system in the catalog? ? After Juliaugong's prompt, I found the foreign language description of VSFTPD, prove that this option is a knife to solve all users can limit the directory at home.

We can add the following line by changing the vsftpd.conf file.

chroot_local_user = yes

Don't forget to restart the VSFTPD server

[root @ linuxsir001 root] # /etc/init.d/vsftpd restart

Turn off vsftpd: [OK]

Start VSFTPD for VSFTPD: [OK]

[root @ linuxsir001 root] #

Supplement 2: Open the log function of the VSFTP server

Try the # number in front of the xferlog_file below, that is, open the VSFTP's log function so that we can view vsftpd.log in / var / log directory. This is VSFTP log function, which is extremely important for us.

# xferlog_file = / var / log / vsftpd.log

Add 3: How to make the bound IP to VSFTP?

That is, how to let users access FTP through an IP. In fact, this feature is very interesting. If binding is the IP of the intranet, there is no way to access it outside. If binding is an external service IP, the intranet can only access FTP through an external service IP.

Plus a line in /etc/vsftpd/vsftpd.conf, take my local area network as an example, please see the operating environment in the first post, so that the external network can not access my FTP, the intranet may also pass 192.168.0.2 Access FTP

Listen_address = 192.168.0.2

After adding, restart the VSFTP server

[root @ Linuxsir001 root] # /etc/init.d/vsftpd Restart Close VSFTPD: [OK]

Start VSFTPD for VSFTPD: [OK]

[root @ linuxsir001 root] #

Supplement 4: How to make the VSFTP server limit the number of links, and the maximum number of links to each IP? ?

A: You should change the formulation of the VSFTP server vsftpd.conf, add the following two lines:

MAX_CLIENTS = number

MAX_PER_IP = number

Example: I want my VSFTP to maximize the number of links, each IP, up to 5 links, so I should add the following two lines in vsftpd.conf:

MAX_CLIENTS = 100

MAX_PER_IP = 5

Change the formulation of the file, don't forget to start the VSFTP server.

Supplement 5: How to limit the speed of download?

Anon_max_rate = Note: This is anonymous download speed local_max_rate = number Note: This is the download speed of ordinary users on the VSFTP server

Note: The unit of this number is byte, so we have to calculate it. For example, I want to let the users on the anonymous user and VSFTP in 80kb, so this number should be 1024x80 = 81920 so we have to add the following two lines in vsftpd.conf.

Anon_max_rate = 81920

LOCAL_MAX_RATE = 81920

Don't forget to restart VSFTPD services

Add 6: My hard disk is limited, what should I do?

My hard disk space is limited, how do I change my account ftp default path / VAR / FTP? Or, all of my Linux is placed in / root partition, because the space is tight, can I put the default path of the FTP user to another partition?

Yes, you should do it as follows!

First of all, remove the FTP user

# urserdel -r ftp

There will be error messages, but it is normal.

Then we add this user again. For example, I want to set the account FTP home directory in / mnt / ling / ftp, we can do the following

[root @ Linuxsir001 root] # MKDIR / MNT / LING

[root @ Linuxsir001 root] # adduser -d / mnt / ling / ftp -g ftp -s / sbin / nologin ftp

Just don't do this, because this still can't let anonymous user find its home directory, so we must change the permissions of / mnt / ling / ftp.

[root @ linuxsir001 root] # chmod 755 / mnt / ling / ftp /

[root @ linuxsir001 root] # chown -r root.root / mnt / ling / ftp /

Supplementary 7: How to customize welcome information

How to appear after we log in to some FTPs: Welcome to LinuxSir FTP, here, you will get the most sincere help, if there is any questions and suggestions, please let me know, thank you.

It is not difficult to implement this, we can view the vsftpd.cof file, whether there is this line.

DirMessage_enable = YES

If you don't add, if DirMessage_enable = YES has ##, you will remove the ##.

Then we develop a .message file, write something you want to write, such as. Message content is as follows: Welcome to LinuxSir ftp!

Here you will get the most sincere help;

If there is any questions and suggestions, please let me know, thank you.

We can use the editor to write this. Message, I don't want to say this process.

Then we copy the .message file to the home directory of each user. For example, a user of my FTP is Beinan, the home directory where the user is located is / Home / Beinan

We have to put it in the / home / beinan in this directory. If the system user ftp, his directory is / var / ftp this directory, this is the default, and when an anonymous user logins is the / var / ftp directory. We want an anonymous user to see welcome information. It is necessary to put it in / var / ftp directory. Other users, nothing more than similar operations.

Supplement 8: How to implement a virtual path?

For example: / home / a mapping to ftp: // localhost / A / home / b / c is ftp: // localhost / c

In fact, this cannot be said to be vsftpd content. In fact, we have already touched it, probably we don't pay attention, we can be implemented by the following methods.

#mount --bind [Original Contents] [New Directory]

For example, my FTP's default directory is / var / ftp, I want to put the / mnt / ling / winsoft folder, mapped to / var / ftp directory, I will do this

We must first build a directory in / var / ftp directory

#mkdir / var / ftp / winsoft

Then execute the mount command

#mount - Bind / MNT / LING / WINSOFT / VAR / FTP / WINSOFT

This is OK.

Supplement Nine: How to get anonymous access, upload, and support download and execute?

In the default, VSFTP does not support access to anonymous users, so we have to open the appropriate options yourself. Now I am in response to this problem, we have to open the following options.

Anonymous_enable = yes Note: Allow anonymous access

Anon_upload_enable = yes Note: Allow upload

Anon_mkdir_write_enable = yes Note: Allows the establishment of a corresponding directory

Anon_umask = 022 Transmitted to FTP file or directory change permission

Of course, open these options or not, we also want to let anonymous write files have written rights, with the FTP I have made, the FTP I have done is / var / ftp In VSFTPD, / var / ftp is not allowed to make an anonymous users write permissions. This is for security considerations, so we must build a directory in / var / ftp directory, let this directory written right .

For example: I built a UPLOAD directory in / var / ftp directory, and then set it to 777, so anonymous users can write.

#mkdir / VAR / FTP / UPLOAD

#CHMOD 777 / VAR / FTP / UPLOAD

Change a series of files, don't forget to restart the vsftpd server

I used Standalone mode, of course, using the following method

[root @ Linuxsir001 root] # service vsftpd restart

Turn off vsftpd: [OK]

Start VSFTPD for VSFTPD: [OK]

[root @ linuxsir001 root] #

If you use the xinetd mode to start vsftpd, we have to restart the xinetd server [root @ Linuxsir001 root] # Service Xinetd Restart

Stop xinetd: [OK]

Start xinetd: [OK]

[root @ linuxsir001 root] #]

Add 10: Adding a virtual user through the PAM authentication method

With PAM certification, add users with DB_LOAD, is a real virtual user. Now we briefly introduce, through future learning, we will further add:

1. Create a file FTP in the /etc/pam.d/ directory

[root @ Linuxsir001 root] # Touch /etc/pam.d/FTP

2. Inside /etc/pam.d/ftp plus the following two lines

Auth Required /Lib/security/pam_userdb.so db = / etc / vsftpd_login

Account Required /Lib/security/pam_userdb.so db = / etc / vsftpd_login

3. Create a user-friendly file logins.txt

[root @ linuxsir001 root] # Touch logins.txt

In the logins.txt file, enter the following content. You can be your own. For example, I will below. In fact, LinuxSir007 is a virtual user name of FTP. password.

Linuxsir007

123456

Linuxsir008

234567

Linuxsir009

567890

Linuxsir010

678901

Linuxsir011

789012

4. Create a real user name LinuxSir006, this LinuxSir006 user, the home directory is scheduled by you. I have said not much here. I am added by the system default.

[root @ Linuxsir001 root] # UserAdd Linuxsir006

5. Copy / etc / hosts to / home / linuxsir006 and change its host

[root @ Linuxsir001 root] #CP / etc / hosts / home / linuxsir006 / hosts

[root @ Linuxsir001 root] #Chown Linuxsir006.LinuxSir006 / HOME / LinuxSir006 / Hosts

6. Create a library file of a virtual user via db_load. We built a logins.txt file in front, I am in the / root user directory. So we have to switch the directory to the / root directory to create a library file for the virtual user.

[root @ Linuxsir001 root] # db_load -t -t hash -f logins.txt /etc/vsftpd_login.db

7. Change the vsftpd.conf file, join the following lines

PAM_SERVICE_NAME = FTP

Guest_enable = yes

guest_username = linuxsir006

Anon_World_Readable_only = no

8. Restart the VSFTPD server; change a series of files, don't forget to restart the vsftpd server

I used Standalone mode, of course, using the following method

[root @ Linuxsir001 root] # service vsftpd restart close vsftpd: [OK]

Start VSFTPD for VSFTPD: [OK]

[root @ linuxsir001 root] #

If you use the xinetd mode to start vsftpd, we have to restart the Xinetd server

[root @ linuxsir001 root] # service xinetd Restart

Stop xinetd: [OK]

Start xinetd: [OK]

[root @ linuxsir001 root] #

9. If you want the user to log in to FTP, log in to successful information, please copy you .Message to your user's home directory, please refer to the previous supplements.

10. test:

[root @ linuxsir001 root] # ftp 192.168.0.1

Connected to 192.168.0.1.

220 (vSFTPD 1.1.3)

530 please login with user and pass.

530 please login with user and pass.

Kerberos_v4 rejected as an automation type

Name (192.168.0.1 :root): LinuxSir007

331 Please Specify The Password.

PASSWORD:

230 - Welcome to LinuxSir Free FTP

230 - Here you will get the most sincere help!

230- This site is limited to 30KB!

230- Each IP limit four threads

230- Please observe the relevant provisions of FTP.

230- Thank you!

230-

230-LinuxSir Management Department

230 Login Successful. Have fun.

Remote System Type IS UNIX.

Using binary model to transfer files.

FTP> LS

227 Entering Passive Mode (192, 168, 0, 1, 85, 171)

150 Here Comes The Directory Listing.

-rw-r - r - 1 ftp ftp 174 jun 01 12:59 Hosts

DRWXR-XR-X 3 ftp ftp 4096 jun 01 13:29 Linuxsir008

DRWXR-XR-X 2 ftp ftp 4096 jun 01 13:24 Sun

226 Directory Send OK.

FTP>

Reix 11: How to start the system with Standalone boot to start with xinetd?

How to install the system defaults in Redhat 9.0, the system default vsftpd is started with the Standalone launch method, changed to the xinetd startup mode? If it is installed with the source package, the XINETD mode is installed after installation. If it is installed with an RPM package, in Redhat 9.0, you should use the following method to solve it.

1. Create a file vsftpd in the /etc/xinetd.d/ directory

[root @ linuxsir001 root] # Touch /etc/xinetd.d/vsftpd

/etc/xinetd.d/vsftpd content is as follows:

Service ftp

{

Socket_type = stream

Wait = NO

User = root

Server = / usr / sbin / vsftpd

# Server_args = # log_on_success = DURATION UserId

# log_on_failure = UserID

Nice = 10

Disable = no

}

2. Copy vsftpd.conf to / etc / directory, because Xinetd is in / etc directory, so we must copy this file to the / etc directory, otherwise there will be a LOCAL user in the system cannot log in, that is To put it, you don't have a copy of this document that FTP non-anonymous users cannot access it, only with anonymous user access.

[root @ Linuxsir001 root] # CP /etc/vsftpd/vsftpd.conf /etc/vsftpd.conf

3. Change the formulation file /etc/vsftpd.conf, note the following items: That is

Listen = yes

Change to

# listen = yes

Or delete this line.

4. Remove the /etc/init.d/vsftpd file. In fact, the best backup is elsewhere, because we sometimes go to the experiment, may also go to the Standalone mode startup. I move directly to other directories, such as the Backup directory below / root.

[root @ Linuxsir001 root] #MKDIR / ROOT / BACKUP

[root @ linuxsir001 root] # mv /etc/init.d/vsftpd / root / backup

5. Run NTSYSV, cancel the service of VSFTPD

[root @ Linuxsir001 root] #ntsysv

vsftpd

6. Restart the xinetd service

[root @ linuxsir001 root] # service xinetd Restart

转载请注明原文地址:https://www.9cbs.com/read-32101.html

New Post(0)