Study Notes for Linux practice engineers 14

Source: Internet
Author: User

LinuxUseUDisk

# Ls/dev confirm that the device has been recognized

# Mount-O iocharset = gb2312/dev/sda1

Press Ctrl + F to flip (or space) Ctrl + B (roll up)

Ls-A: Show Hidden Files (Files starting)

File Permission RWS s indicates the user who executes the program and temporarily has the same authority as the owner to execute the program.

The-R parameter of the CP-r source object indicates that the sub-directories are copied together.

Rm-I confirm deletion

-R: delete sub-Directories

-F force Delete

Du disk or directory space used

DF disk or directory available space

Cat> file1 is equivalent to the input text. After the input, CTRL + C or Ctrl + D ends.

> A symbol is appended to the end of a file.> a symbol is used to create a new file.

Less: Scroll up and down File Content

Which searches for files in the directory set by $ path.

 

FTPServer

Use TCP for FTP

Port 21 Transmission Control Information

20 Port Data Transmission

Verification Information is transmitted in plaintext

Anonymous user Anonymous

Binary-mode transfer programs, images, and other binary files

ASCII mode refers to text files

Install vsftpd

1. Download the source code vsftpd- 2.0.5 .Tar.gz

2. Compile the source program. See the Help File install.

# Tar zxvf vsftpd- 2.0.5 .Tar.gz

# Cd vsftpd- 2.0.5

# Make

# Make install

3. Install the configuration file

# Cp vsftpd. CONF/etc

# Cp RedHat/vsftpd. PAM/etc/PAM. d/ftp

4. Compile the configuration file/etc/vsftpd. conf

5. Start the server

#/Usr/local/sbin/vsftpd &

 

Configuration File

Listen = Yes server runs independently

The default configuration file of the server. Other users are not allowed to log on. Only anonymous users can log on. to log on anonymously, you must first create the/var/FTP directory.

Finger user information viewing tool

Finger FTP confirms if FTP user exists

 

Allows anonymous users to log on. You need to create an FTP user and A/var/FTP directory.

# Mkdir/var/ftp

# Chown root. Root/var/ftp

# Chmod og-W/var/ftp

Add/usr/local/sbin/vsftpd &

# Netstat-tnl view locally started services

Vsftpd can be run in two ways

Enable vsftpd to run independently and Disable xinetd.

# Chkconfig vsftpd off

Vsftpd configuration file

Anonymous_enabled = yes # Anonymous Logon Allowed

Local_enable = yes # allow local users to log on

Write_enable = yes # Allow the client to write

Local_umask = 022 # umask value of the new local file

Anon_upload_enable = yes # Allow anonymous users to upload files

Anon_mkdir_write_enable = yes # Allow anonymous users to create directories

Dirmessage_enable = yes # messages in the allowed directory

Ftpd_banner = welcome to RedHat # Welcome word for Logon

Ls_recure_enable = yes # Allow the client to use the LS-R command

Listen = yes # listening mode

Modify the configuration file and restart the vsftpd service.

# Killall-9 forced termination of vsftpd

#/Usr/local/sbin/vsftpd & start

# ID RedHat view RedHat user information (group ID, Group)

# Mkdir/var/FTP/incoming # Open the upload incoming directory for anonymous users

# Chgrp FTP incoming

# Chmod g + W incoming

Chroot environment (you cannot change the main directory, view other directories outside the main directory, and hide the location of the main directory)

 

/Etc/vsftpd. conf:

Chroot_list_enable = Yes

Chroot_list_file =/etc/vsftpd. chroot_list

 

/Etc/vsftpd. chroot_list: (the user list that locks the main directory)

RedHat

Chiaitlab

 

# Killall-hup vsftpd

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.