FTP service knowledge

Source: Internet
Author: User
FTP service knowledge-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Install ProFTP 1.2.9

You can install ProFTP to provide ftp services.
Download the proftpinstallation package proftpd-1.2.9.tar.gz and decompress it with the tar command. You can also in the graphical interface, select the compressed package right-click, in the pop-up menu SELECT "decompress" to decompress, formed after the formation of the proftpd-1.2.9 directory.
In the command line mode, go to the proftpd-1.2.9 directory, execute configure, make, make install, make clean and other commands in turn to complete the installation. For convenience, you can use semicolons (;) to separate these commands into one line, as shown below.
./Configure; make install; make clean
The ProFTP installer will put the configuration file proftpd. conf under/usr/local/etc, and put the executable files proftpd and ftpshut under/usr/local/sbin.

Basic Configuration

Before Running proftpd, you need to set the runtime environment and proftpd configuration files so that the software can run as required.
First, check whether the system has the default ftp home directory of the System user, that is, the/var/ftp directory.
The/var/ftp directory is the default home directory of the System user ftp, and is automatically entered after anonymous ftp users (anonymous) log on.
If no/var/ftp exists, the anonymous ftp service may be faulty.
If the directory/var/ftp is not in the system, create it and set its owner to ftp. The command is as follows:
Mkdir/var/ftp
Chown ftp. ftp/var/ftp
Another way is to modify the ftp attribute of the System user so that the home directory directs to another existing Directory. The method is: Run
Start → set → Control Panel → local users and groups, find the ftp user, select it, right-click it, execute "properties" in the pop-up menu to bring up the user's Property setting interface, enter the corresponding directory in the "main directory", and then click OK.
Next, modify the proftpd configuration file/usr/local/etc/proftpd. conf.
The configuration file contains User and Group items, which are used to set the identity for running proftpd. The Group item initial value is set
In fact, the group "nogroup" is not automatically created in Hongqi Linux4.1. Only the group "nobody" is created (including the nobody user ). Therefore, the Group item should be changed
Group nobody
If you want to grant write permissions to anonymous users, you should also modify the configuration file andTo:

# DenyAll
AllowAll


User permission Control

After the preceding configuration, you can only access the Home Directory of the System user ftp when logging on as an anonymous user. Read and write permissions are controlled by the configuration file. For example
If you have created a common user account, you can also use this account to log on to the ftp service. The password is the password used by the user to log on to the system. This user has the same read and write permissions as when logging on to the system directly. This means that after the user logs in via ftp, he has the read permission on the vast majority of files and directories in the system and can download them! In most cases, this is dangerous.
If you want normal users to be restricted to their home directories after logging in via ftp, you need to set the configuration file/usr/local/etc/proftpd. conf
Ultroot ~ in ~ Effective. The method is simple. Take DefaultRoot ~ Delete the previous.

Start

Run the proftpd command to start proftpd and provide the FTP service in stand-alone mode. The command with the complete path is as follows:
/Usr/local/sbin/proftpd
If you want proftpd to be automatically started, open/etc/rc. d/rc. local and add the following line.
/Usr/local/sbin/proftpd
In this way, the proftpd is automatically started every time the computer is started.

Related commands

Disable FTP service
Ftpshut now
This command will generate the file shutmsg under/etc. This command only stops the FTP service and does not close the proftpd program.
Re-open the FTP service
Ftpshut-R now
Deleting/etc/shutmsg can also produce the same effect.
View online server count
Ftpcount
Show online personnel list
Ftpwho
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.