Solve the problem of Linux FTP anonymous upload and download starting automatically

Solve the problem of Linux FTP anonymous upload and download starting automatically

If you often use FTP server in your study or work, you can set it to start automatically at boot. Before setting it, you need to understand several commands about automatic startup.

1.chkconfig command

Main function: used to check and set various system services. There are several important parameters. First, understand --list. chkconfig --list: lists all the commands that chkconfig knows. chkconfig service name on /off: turn on or off the service (usually start or stop automatically at boot)

2. Check whether vsftpd is set to start automatically at boot.

chkconfig --list | grep vsftpd: "|" means pipe, which is used to connect the two commands and use the output of the previous command as the input of the latter command. Note that it is the standard input and output of the command, because the pipe command will automatically ignore the wrong standard input.

grep: a powerful text search tool in Linux system

The above results show that vsftpd is not set to start automatically at any level.

2. Set vsftpd to start automatically at boot, command: chkconfig vsftpd on

You can see that vsftpd has been started at levels 2 3 4 5, indicating that it has been set up successfully.

3. If you want to perform anonymous operations, first make sure that anonymous_enable=YES in the vsftpd.conf configuration file.
Server IP: 192.168.12.2 (linux)
Client IP: 192.168.12.1 (Win 10)

echo: print the value of a variable or a given string, >: redirect standard output to input the command correctly into the specified file in an overwriting manner; >>: redirect standard output to input the command correctly into the specified file in an appending manner,

4. Log in to the client and download the test.txt file

5. To upload files, you need to modify the vsftpd.conf configuration file, anon_`upload_enable=YES, to enable the upload function; if you want anonymous users to create files and write, you can turn on anon_mkdir_write_enable=YES. After the modification, you must restart the vsftpd service, remember!

To implement the upload function:

If you encounter the following situation, don't worry, it may be that the pub folder has insufficient permissions. Just increase the permissions: chmod 777 /var/ftp/pub

Retest:

View on the server side:

Summarize

The above is the editor's introduction to solving the problem of Linux FTP anonymous uploading and downloading automatically starting at boot. I hope it will be helpful to everyone!

You may also be interested in:
  • Detailed application of command get to download files and put to upload files in Linux ftp command line
  • Code summary of using Shell script to realize automatic upload and download of FTP under Linux
  • How to use FTP on Windows desktop to upload files to Linux server
  • How to automatically backup mysql in linux system and upload it using ftp
  • Shell script to automatically backup MySQL data and upload it to FTP under Linux
  • Use Linux shell script to implement FTP scheduled execution of batch download of specified files

<<:  Solution to the MySQL error "Every derived table must have its own alias"

>>:  Vue + element to dynamically display background data to options

Recommend

Some indicators of excellent web front-end design

The accessibility of web pages seems to be somethi...

Table Tag (table) In-depth

<br />Table is a tag that has been used by e...

Example of how to quickly build a Redis cluster with Docker

What is Redis Cluster Redis cluster is a distribu...

15 JavaScript functions worth collecting

Table of contents 1. Reverse the numbers 2. Get t...

Do not start CSS pseudo-class names with numbers

When newbies develop div+css, they need to name t...

Solve the problem that Mysql5.7.17 fails to install and start under Windows

Install MySQL for the first time on your machine....

The complete usage of setup, ref, and reactive in Vue3 combination API

1. Getting started with setUp Briefly introduce t...

Summary of common commands for Ubuntu servers

Most of the commands below need to be entered in ...

Example of implementing colored progress bar animation using CSS3

Brief Tutorial This is a CSS3 color progress bar ...

Example code for evenly distributing elements using css3 flex layout

This article mainly introduces how to evenly dist...

Linux Domain Name Service DNS Configuration Method

What is DNS The full name of DNS is Domain Name S...

Detailed explanation of the usage of scoped slots in Vue.js slots

Table of contents No slots Vue2.x Slots With slot...

How to use CSS style to vertically center the font in the table

The method of using CSS style to vertically cente...