LINUX study notes - FTP server settings (2)


Step Two: Configure incoming subdirectory permissions

Open proftpd.conf, add the following and is disposed between the segments:

Order allow ,deny

Allow from 10.0.8.

Deny from all

means that the customer who logs in from the 10.0.8 network segment in the incoming subdirectory The terminal has the permission to write "WRITE", and other people's write permission to the directory is prohibited. If you want to open write access to all users, just replace the content between the and "Allowall".

IV. FTP server related commands

1. ftpshut: Close the FTP service and generate the file shutmsg in /etc. To reopen the FTP service, delete /etc/shutmsg.

2, ftpcout: FTP server online number information display.

3, ftpwho: FTP server online staff list.

Appendix: Proftpd.conf full text and explanation

# This is a basic ProFTPD configuration file (rename it to

# 'proftpd.conf' for actual use. It establishes a single server

# and a single anonymous login. It assumes that you have a user/group

# "nobody" and "ftp" for normal operation and anon.

ServerName "MY REDHAT LINUX FTP" #Set the name of the FTP server

ServerType standalone #Set FTP to run in Standalone mode instead of dameon mode

DefaultServer on #DefaultFTP Server work

# Port 21 is the standard FTP port.

Port 21 #FTP service default port

# Umask 022 is a good standard umask to prevent new dirs And files

# from beingsgroupsand world writable.

Umask 022 #default

RequireValidShell off #guarantee anonymous users to log in normally, do not change

ServerIdent off # Do not display ftp service Server version information to enhance security

# To prevent DoS attacks, set the maximum number of child processes

# to 30. If you need to allow more than 30 concurrent connections

# at once, simply increase this value. Note that this ONLY works

# in standalone mode, in inetd mode you should use an inetd server

# that allows you to limit Maximum number of processes per service

# (such as xinetd)

MaxInstances 30

# Set the user andsgroupsthat the server normally runs at.

User Nobody #Set the FTP service to run with nobody

Group nobody #Note: It turns out to be "Group nobody", be sure to change to "Group nobody"

# Normally, we want files to be overwriteable.

AllowOverwrite on

# A basic anonymous configuration, no upload directories. The following paragraph is the setting of the anonymous service.

User ftp # anonymous login using ftp user

Group ftp # anonymous login using ftp group

# We want clients to be able to login with "anonymous" as well As "ftp"

UserAlias ​​anonymous guest # Give the ftp user an anonymous alias, so that the anonymous login is the ftp user login.

# Limit the maximum number of anonymous logins

MaxClients 10 #Up to 10 anonymous users online at the same time

# We want 'welcome.msg' displayed at login, and ' .message' displayed

# in each newly chdired directory.

DisplayLogin welcome.msg #Login the welcome message displayed by FTP. Place it in the root directory of FTP.

DisplayFirstChdir .message

# Limit WRITE everywhere in the anonymous chroot


Order allow, deny

Allow from 10.0.8.

Deny from all

Copyright © Windows knowledge All Rights Reserved