Proftpd installation configuration instance

Source: Internet
Author: User
Proftpd installation configuration instance: one proftpd installation configuration instance. Purpose: install and configure a proftpd to meet the following requirements: 1 anonymous access is not allowed. 2. open an account and only have the upload permission in the upload Directory. you can resume the upload without renaming or deleting the account. Operation: The installation configuration instance of 0 proftpd is a proftpd installation configuration instance. Purpose: install and configure a proftpd to meet the following requirements: 1 anonymous access is not allowed. 2. open an account and only have the upload permission in the upload Directory. you can resume the upload without renaming or deleting the account. Operation: 0 switch to the root account su root // enter the root password. 1. download proftpd: www.proftpd.org. We have downloaded wget 1.2.9. ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.9.tar.gz 2 install proftpd switch to the download directory, assuming/tmp/proftpd, then tar zxvf proftpd-1.2.9.tar.gz // Unzip the cd proftpd-1.2.9. /configure -- prefix =/var/proftpd -- sysconfdir =/etc // Set the installation directory/var/proftpd, the configuration file directory/etc make install 3 creates an ftp dedicated account, which is the dedicated account mentioned in the above purpose. here we use skate/skate (u/p) as an example. Groupadd skate useradd skate-g skate-d/var/ftp-s/sbin/nologin // Set/var/ftp directory to ftp directory passwd skate // Set skate user password mkdir/var/ftp/upload chown skate. skate/var/ftp/upload // Set the upload Directory. skate users can write 4. set the proftpd configuration file to/etc/proftpd. conf vi/etc/proftpd. conf // open proftpd. conf #### specific configuration ###### ServerName "Test ftp server... "ServerType standalone DefaultServer on # Port 21 Umask 022 # maximum number of threads Ma XInstances 30 u ser skate Group skate # DNS lookup UseReverseDNS off IdentLookups off # maximum number of attempted connections 3 # MaxClientsPerHost per user thread 2 # maximum number of users MaxClients 20 DirFakeUser On skate users On skate DeferWelcome On # log file location: SystemLog/var/log/proftpd. log ServerIdent off # restrict skate users in the skate group from switching to other directories (only staying in their home directory) DefaultRoot ~ Skate and skate # set to allow logon only to users with 192.168.0 # ; # Order allow, deny # Allow from 192.168.0. # Deny from all # ; # Set to allow only skate users to log on; otherwise, system users can also log on to ftp # ; # Order allow, deny # DenyUser! Skate # ; # Enable full write permissions ; AllowOverwrite on AllowStoreRestart on # Allow FXP # AllowForeignAddress on ; AllowAll ;; # Set the skate user's limit on upload # DELE delete permission # rnfr rnto rename permission # rmd xrmd move directory permission ; ; DenyUser skate ; ###### End ###### after editing, press Esc and input: x to save the changes. 5. edit a startup script for the startup service (this is included in proftpd and has been slightly modified) vi/etc/rc. d/init. d/proftpd ##### script content start #########! /Bin/sh # Startup script for ProFTPD # chkconfig: 345 85 15 # description: ProFTPD is an enhanced FTP server with \ # a focus toward simplicity, security, and category of configuration. \ # It features a very Apache-like configuration syntax, \ # and a highly mizmizable server infrastructure, \ # including support for multiple 'virtual' FTP servers, \ # anonymous FTP, and permission-based directory visibility. # processname: proftpd # config:/etc/proftpd. conf ## By: Osman Elliyasa ; # $ Id: proftpd. init. d, v 1.7 2002/12/07 21:50:27 jwm Exp $ # Source function library .. /etc/rc. d/init. d/functions if [-f/etc/sysconfig/proftpd]; then. /etc/sysconfig/proftpd fi # set the environment variables in the following line. Note that the installation directory PATH of your proftpd is set to "$ PATH:/usr/local/sbin: /var/proftpd/bin:/var/proftpd/sbin "# See how we were called. case "$1" in start) echo-n "Starting proftpd:" daemon proftpd $ OPTIONS echo touch/var/lock/su Bsys/proftpd; stop) echo-n "Shutting down proftpd:" killproc proftpd echo rm-f/var/lock/subsys/proftpd; status) status proftpd; restart) $0 stop $0 start; reread) echo-n "Re-reading proftpd config:" killproc proftpd-HUP echo; suspend) hash ftpshut>; /dev/null 2>; & 1 if [$? = 0]; then if [$ #-gt 1]; then shift echo-n "Suspending with '$ *'" ftpshut $ * else echo-n "Suspending NOW" ftpshut now "Maintanance in progress" fi else echo-n "No way suspend "fi echo ;; resume) if [-f/etc/shutmsg]; then echo-n "Allowing sessions again" rm-f/etc/shutmsg else echo-n "Was not suincluded" fi echo; *) echo-n "Usage: $0 {start | stop | restart | status | reread | resume" Hash ftpshut if [$? = 1]; then echo '} 'else echo' | suspend} 'echo 'suspend accepts additional arguments which are passed to ftpshut (8) 'Fi exit 1 esac if [$ #-gt 1]; then shift $0 $ * fi exit 0 ####### script end ######## press Esc and input: x to save the operation. Modify permissions, add them to system services, and start chmod + x/etc/rc. d/init. d/proftpd chkconfig -- add proftpd service proftpd start you can use service proftpd restart to restart proftpd.
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.