Pure-FTPd Ö÷Îĵµ ÖÐÎÄÎĵµ ·ÖÏí
1.¼ò½é
Pure-FtpdÊÇÒ»¸ö¿ìËÙ¡¢²úÆ·¼¶£¨production-quality£©µÄ±ê×¼¸ñʽFTP·þÎñÆ÷£¬»ùÓÚTroll©¤FTPd¡£
Éè ¼ÆÉÏ£¬´Ë·þÎñÆ÷µÄĬÈÏÉèÖü´Ê®·Ö°²È«£¬Ã»ÓÐÒÑÖªµÄÈõµã¡£ËüºÜÈÝÒ׾ͿÉÒÔ½¨ÆðÀ´£¬¶øÇÒÊÇרΪÏÖÔÚµÄÄÚºËÉè¼ÆµÄ¡£ËüÒѾ±»³É¹¦µÄÒÆÖ²µ½ºÜ¶à²Ù×÷ϵͳ£¬Èç inux,FreeBSD, NetBSD, OpenBSD, ISOS, EkkoBSD, BSDi, Solaris, Darwin, Tru64, Irix, AIX £¬HPUX¡£
ËüµÄÌصãÓУº
chroot()edºÍ/»òÐéÄâchroot()ed Ö÷Ŀ¼¡¢ÐéÄâÓò¡¢ÄÚ½¨µÄ¡°ls¡±£¬ antiwarezϵͳ¡¢±»¶¯ÏÂÔØ¿ÉÉèÖö˿ڡ¢FXPÐÒé¡¢´ø¿íÏÞÖÆ¡¢´ÅÅÌÅä¶î¡¢»ùÓÚLDAP/Mysql/PostgreSQLµÄÑéÖ¤¡¢¸ñÑÔ (fortune)Îļþ¡¢ÀàApacheµÄÈÕÖ¾¡¢¿ìËÙ¶ÀÁ¢ÔËÐÐģʽ¡¢Îı¾/HTML/XMLʵʱ״̬±¨¸æ¡¢ÐéÄâÓû§¡¢ÐéÄâ´ÅÅÌÅä¶î¡¢ÓÅÏȼ¶·ÖÀë¡¢SSL /TLSµÈ¡£
2¡¢ËÔÚʹÓÃPure-FTPd£¿
ºÜ¶àÈËÑ¡ÔñʹÓÃPure-FTPdÒòΪËüºÜÈÝÒ×°²×°¡£µ«Õâ¸öÈí¼þҲʹÓÃÔÚǶÈëʽ²Ù×÷ϵͳºÍ¸ß¸ººÉµÄÆóÒµ·þÎñÆ÷ÉÏ£¬ÌرðÊǼ¯Èº·þÎñ¡£
³É¹¦Ê¹ÓÃpure-ftpdµÄ¹«Ë¾Áбí¿ÉÔÚhttp://www.pureftpd.org/users.shtm µÃµ½¡£
Pure-ftpdºÍÆäËûµÄһЩÈí¼þ¹¹³ÉÁËÒ»¸öÌôÕ½µçÄÔº§¿ÍµÄ»úÆ÷µÄÒ»²¿·Ö£¬ÖÁ½ñ»¹Ã»ÓÐÈ˳ɹ¦¹¥Õą̂·þÎñÆ÷¡£
¶ÔÓµÓм¯ÖÐÓû§¹ÜÀíµÄ´óÐÍÕ¾µã£¬Pure-FTPdÌṩÁËÁé»îµÄÑéÖ¤·½°¸£¬°üÀ¨SQL/LDAP backends£¬»¹¿ÉÒÔÇáËɵÄÓÃÈκÎÓïÑÔдÓû§²Ù×÷Êֲᡣ
3.±àÒë
ÔÚ Ä¿Ç°£¬Pure-FTPdʹÓÃÁËһЩ²Ù×÷ϵͳרÓеĵ÷Óá£ËäȻΪÁËʹÆä¿ÉÒÔÒÆÖ²µ½ÆäËû²Ù×÷ϵͳ½øÐÐÁËһЩÒÆÖ²µÄ¹¤×÷£¬ËüÔÚLinux FreeBSD,NetBSD,OpenBSD,ISOS,EkkoBSD,BSDi,Darwin,Solaris,Tru64,Irix,AIX£¬HPUX Ï¿ÉÒÔÔËÐУ¬ÔËÐÐÓÚÆäËû²Ù×÷ϵͳÈÔÐèŬÁ¦¡£ÔÚÈκÎÒ»¸öÏÖ´úµÄLinux·¢ÐаæÉ϶¼Ó¦¿ÉÒÔÔËÐС£
·Ç¹Ù·½µÄwindows°æ±¾¿ÉÔÚÕâÀïµÃµ½
http://www.pureftpd.org/windows
Èç¹ûÄãµÄϵͳÀï°²×°ÁËcdialog»òÕßxdialog£¬¿ÉÒÔÔËÐÐÏÂÃæµÄÃüÁîÀ´±àÒë°²×°Pure-FTPd
make -f Makefile.gui
Èç¹ûÄãûÓа²×°Cdialog»òÕßÄúÆ«ºÃ´«Í³µÄ·½·¨£¬¿ÉÒÔÕâÑù£º
./configure
make install-strip
Et voila!ÏÖÔÚ£¬Èí¼þ¾ÍÒѾװÔÚ/usr/local/sbin/pure-ftpd
ÒªÔËÐзþÎñÆ÷£¬Ö»ÒªÊäÈëÏÂÁÐÃüÁ
/usr/local/sbin/pure-ftpd &
Èç¹ûÄã°²×°µÄÊǶþ½øÖƵÄÈí¼þ°ü£¨RPM£¬SLP,Debian£©£¬¿ÉÄÜÒªÊäÈëÏÂÃæµÄÃüÁî
/usr/sbin/pure-ftpd &
ÏÖÔÚÄãµÄ·þÎñÆ÷ÒѾ½¨ºÃ¡£Ö»ÐèÊäÈë¡®ftp localhoat¡¯À´²âÊÔ¡£Èç¹ûÄãÏ£Íû·þÎñÆ÷ÔÚÆô¶¯Ê±×Ô¶¯ÔËÐУ¬ÔÚ/etc/rc.d/rc.local»òÕß/etc/rc.d/boot.local Ìí¼ÓÉÏÃæµÄÃüÁîÐС£±ðÍüÁË¡°&¡±·û¡£
×¢ÒâÊÂÏî
1£º
ÔÚ linux²Ù×÷ϵͳ£¬Äã»á·¢ÏÖ·þÎñÆ÷×ÜÊÇÒÔrootÔËÐС£ÕâÑù×öÊÇÓÐÒâµÄ£¬ÒòΪÕâÑù¶ÔÄÇЩ¸Ä±äÆäÓÐЧUID(Ö»ÊǸıäÁËÓÐЧuid£¬ËüÃÇʵ¼ÊÉÏÈÔÈ»ÓÐ rootµÄÓÅÏȼ¶£¬ÓÃps -U¿´¿´·þÎñÆ÷ÊÇ·ñÊÇÓÉrootÔËÐÐ)µÄ·þÎñÆ÷¸ü°²È«¡£ÎÒÃÇʹÓÃÁËÒ»¸öLinuxÄÚºËרÓеļ¼ÇÉÈ¥µô¡°ps¡±²»ÄÜÏÔʾµÄÓÅÏȼ¶¡£
2:
ÔÚIrixϵͳÏ£¬ÔÚÊäÈë./configure֮ǰӦ×öÈçÏÂÉèÖÃ:
export CC=cc
export CFLAGS=-I/usr/freeware/include
export LDFLAGS=-L/usr/freeware/lib32
ÔÚSolaris 8ϵͳϱàÒ룬ӦʹÓÃGNU Make£¬¶ø²»ÊÇSolaris basic make£¬È»ºóÔËÐÐ
export PATH=/usr/ccs/bin:$PATH
export MAKE=gmake
3:
ҪжÔØPure-FTPd£¨²»»á°É£¬ÄãÕæµÄÒªÕâÑù×ö£¿£©£¬ÔËÐУº
./configure
make uninstall
4.¸ß¼¶±àÒë
±àÒëÇ°£¬¡°./configure¡±½Å±¾¿ÉÒÔ½ÓÊÜһЩÄãÏ£ÍûÌí¼ÓµÄÑ¡Ï
/--------------------
"--with-"Ñ¡Ïî
--------------------/
4.1. --with-altlog:
×÷ ΪsyslogÊä³öµÄ¸½¼Ó£¬Ö§³Ö½«ÈÕÖ¾ÒÔ¿ÉÑ¡¸ñʽдÈëÌض¨µÄÎļþÖС£ÏÖÔÚ£¬CLF¡¢Stats¡¢W3C¸ñʽµÄÖ§³ÖÒѾÍê³É¡£CLF£¨Í¨ÓÃÈÕÖ¾¸ñʽ£©ÊÇ Apache¡¢WebFS¡¢RoxenµÈ´ó¶àÊýweb·þÎñÆ÷µÄ»ù±¾ÈÕÖ¾¸ñʽ¡£ÕâЩÈÕÖ¾ÎļþÖ»¼Ç¼´«Ë͵ÄÎļþ£¬¶øÇÒ¿ÉÒÔÓÃÓÚwebͳ¼ÆÈí¼þ£¨Analog¡¢ WebalizerµÈ£©À´·ÖÎöFTP·þÎñÆ÷µÄ¸ºÔØ¡£Stats¸ñʽÊÇÒ»ÖÖÌØÊâµÄÊä³ö¸ñʽ£¬ÎªÈÕÖ¾·ÖÎöÈí¼þÉè¼Æ¡£W3C¸ñʽÊÇÒ»ÖÖ±ê×¼µÄ¸ñʽ£¬¿ÉÒÔ±»´ó¶àÊý ÉÌÒµÈÕÖ¾·ÖÎöÈí¼þÀûÓã¨ËùÓÐÖ§³ÖIISµÄÈÕÖ¾·ÖÎöÈí¼þ¶¼¿ÉÒÔ£©¡£Òª»ñÈ¡¸ü¶àÐÅÏ¢£¬²é¿´ÎĵµºóÃæµÄ-OÑ¡Ïî¡£
4.2. --with-brokenrealpath:
һЩSolaris °æ±¾ÓÐbroken realpath£¨£©¹¤¾ß. Èç¹û altlog ºÍ/»ò pure-uploadscriptÔÚÄúµÄϵͳÉϲ»ÄÜÕý³£ÔËÐÐ, ³¢ÊÔÓÃÕâ¸öÑ¡ÏîÖØбàÒëÒ»±é¡£
4.3. --with-certfile=<file>:
SSLÈÏÖ¤Îļþ(Ïê¼û README.TLS). ĬÈϵÄÊÇ /etc/ssl/private/pure-ftpd.pem .
4.4. --with-cookie:
ÔÚÓû§µÇ¼ʱ£¬ÏÔʾһ¶Î¸ñÑÔ»òÕßÌض¨µÄ±êÓÏê¼û -F Ñ¡Ï¡£
4.5. --with-diraliases:
Ö§³ÖÎļþ¼Ð±ðÃû£¨Îª¡°cd¡±ÃüÁî×¼±¸µÄ¡°½Ý¾¶¡±£©¡£ÇëÔĶÁ´Ë¹¦ÄܵÄÏà¹Ø²¿·Ö£¨ÔÚºóÃæµÄÎĵµÀ¡£
4.6. --with-everything:
±àÒëÒ»¸ö½Ï´óµÄ·þÎñÆ÷Èí¼þ£¬¼¸ºõÓµÓÐËùÓеÄÌØÐÔ£ºÈÕ־ѡÔñ¡¢cookies¡¢ÏÞËÙ¡¢´ÅÅÌÅä¶î¡¢²é¿´µ±Ç°Á¬½Ó¡¢ÉÏ´«½Å±¾¡¢ÐéÄâÓû§£¨puredb£©¡¢ÉÏ´«/ÏÂÔرÈÂÊ¡¢ÐéÄâÖ÷»ú¡¢Îļþ¼Ð±ðÃû¡¢ÍⲿÑéÖ¤¡£
4.7. --with-extauth:
±àÒëÖ§³ÖÍⲿÑéÖ¤µÄÄ£¿é¡£ÔÚÆðÓô˹¦ÄÜ֮ǰ£¬ÇëÔĶÁREADME.Authentication-ModulesºÍpure-authd(8)ÊÖ²áÒ³¡£´ó²¿·ÖÓû§²¢²»ÐèÒªÕâ¸ö¹¦ÄÜ¡£
4.8. --with-ftpwho:
Ö§³Ö¡°pure-ftpwho¡±ÃüÁî¡£ÆôÓÃÕâ¸ö¹¦ÄÜÐèÒª¶îÍâµÄÄÚ´æ¡£×îºÃʹ·þÎñÆ÷ÔÚ¶ÀÁ¢ÔËÐУ¨standalone£©Ä£Ê½ÏÂÆðÓô˹¦ÄÜ¡£ÔÚinetdģʽÏ»á½ÏÂý¡£
4.9. --with-language=english
--with-language=german
--with-language=romanian
--with-language=french
--with-language=polish
--with-language=spanish
--with-language=danish
--with-language=Italian
--with-language=brazilian-portuguese
--with-language=slovak
--with-language=dutch
--with-language=korean
--with-language=swedish
--with-language=norwegian
--with-language=russian
--with-language=traditional-chinese
--with-language=simplified-chinese
--with-language=czech
¸Ä±ä·þÎñÆ÷ÐÅÏ¢µÄÓïÑÔ¡£Ä¬ÈÏΪӢÓï¡£Èç¹ûÄãÏë¹±Ï×Ò»¸öÒë±¾£¬Çë·Òë¡°src/messages_en.h¡±Îļþ£¬·¢Ë͵½j@pureftpd.org¡£
4.10. --with-largefile:
ÔÚ 32λÌåϵ½á¹¹Ï£¬Ö§³ÖÏÂÔس¬¹ý2GµÄ´óÎļþ¡£ÓÃFTP´«ÊäÕâô´óµÄÎļþÊǸöÆæ¹ÖµÄÏë·¨¡£ÄãµÄÎļþϵͳ¡¢Äںˡ¢libc¶¼µÃÖ§³Ö´óÎļþ¡£µ±È»£¬FTP¿Í»§ ¶ËÒ²µÃÄܹ»°²È«´¦Àí´óÎļþ¡£ÆôÓôËÏÄܺó£¬ÓÉÓÚʵ¼ÊLinux Äں˵ÄÏÞÖÆ£¬ÏÂÔØ»á±ÈûÓÐÆôÓÃÇ°±äµÃÓеãÂý£¨»òÕ߸üºÄCPU£©¡£×ÜÖ®£º³ý·ÇÄãÕæµÄ´òËãÏÂÔس¬¹ý2GµÄÎļþ£¬²»ÒªÎªÁ˺ÃÍæÆôÓô˹¦ÄÜ¡£
4.11. --with-ldap:
Æô Óñ¾µØLDAPÎļþ¼ÐÖ§³Ö¡£ÆôÓôËÑ¡Ïîºó£¬»áºöÂÔϵͳÕÊ»§¡£ÒªÆôÓô˹¦ÄÜ£¬ÐèÒªOpenLDAP¡£Èç¹ûOpenLDAP°²×°ÔÚ×Ô¶¨ÒåµÄ·¾¶£¬¿ÉÒÔʹÓà --with-ldap=<directory>Óï·¨¡£ÒªÁ˽âLDAPºÍPure-FTPdµÄ¸ü¶àÐÅÏ¢£¬²Î¼ûREADME.LDAPÎļþ¡£
4.12. --with-minimal:
Ϊ ÁËÓÐЧµÄÀûÓÃÏÖ´úFTP¿Í»§¶ËµÄ¹¦ÄÜ£¬Pure-FTPdÌṩÁË»ù±¾µÄFTPÐÒéºÍÐí¶àÀ©Õ¹£¨SITE IDLE, SITE CHMOD, MLSD, ...£©¡£Ê¹ÓÃ--with-minimalÑ¡Ïîºó£¬½«²»»á±àÒëÕâЩÀ©Õ¹¡£µ±È»¾ÍûÓжÀÁ¢ÔËÐеķþÎñÆ÷£¬²»Äܲ鿴Óû§Ãû/×éÃû£¬Ã»ÓÐhumorºÍ ASCIIÖ§³Ö¡£²»¹ý£¬ÕâÑù£¬¿ÉÖ´ÐÐÎļþµÄ´óС»á±ÈĬÈÏ°²×°ÒªÐ¡¡£Òª´ø×Å´ËÑ¡Ïî±àÒë,ÐèÒªGCCµÄ°æ±¾ÖÁÉÙλGCC3.3£¬ÕýÔò±í´ïʽҲ±àÒë½øÈ¥.Èç¹ûÄã »¹Ïë¼õСÌå»ý,¿ÉÒÔͬʱʹÓà --without-globbingºÍ--with-minimal.Èç¹ûÄãÔÚ±àÒëǶÈëʽϵͳ,¾Í¿ÉÒÔʹÓÃÕâ¸öÑ¡Ïî.ÔÚÆäËûÇé¿öÏÂ,ÒªÊDz»Ï£ÍûÄãµÄ¿Í»§ (ÓÈÆäÊÇʹÓÃWindows¿Í»§¶ËµÄ)ÀÏÊDZ§Ô¹,ÄǾÍÃâÁË°É!
4.13. --with-mysql:
ʹÓñ¾µØµÄMysqlµÄÓû§Êý¾Ý¿â Ö§³Ö.µ±ÆôÓôËÑ¡Ïîʱ,»áºöÂÔϵͳÕÊ»§.ÒªÆôÓÃÕâ¸ö¹¦ÄÜ,ÐèÒª°²×°Mysql¿Í»§¿â.Èç¹ûMysql°²×°ÔÚ×Ô¶¨ÒåµÄ·¾¶,ÄǾÍʹÓÃ--with- mysql=<directory>Óï·¨.Èç¹ûÐèÒª¸ü¶à¹ØÓÚMysqlºÍPure-FTPdµÄÐÅÏ¢,Çë²Î¿¼README.MysqlÎļþ.
4.14. --with-nonroot:
½¨ Á¢Ò»¸ö²»ÐèÒªrootȨÏ޾ͿÉÒÔÆô¶¯µÄ·þÎñÆ÷.ÈκÎÕý³£µÄÓû§¶¼¿ÉÒÔÔËÐзþÎñÆ÷.Èç¹ûÄãÔÚ·ÇרÓõÄÖ÷»úÉÏÓÐÒ»¸öÊÜÏÞshell,Õâ¸ö¹¦Äܽ«ºÜÓÐÓÃ.µ«Ò»Ð© ¹¦Äܽ«±»¹Ø±Õ,¶øÇÒÃÜÂëÑéÖ¤Ö»ÄÜͨ¹ýLDAP,SQL»òÕßPuredb.µ±ÐéÄâchroot¹¦ÄÜÆôÓúó,Óû§¾Í»á±»ÏÞÖÆÔÚ·þÎñÆ÷¿ªÊ¼µÄÎļþ¼ÐÄÚ.ÕâÖÖģʽ ²¢²»°²È«,Ö»ÊÇÈÃÆÕͨÓû§(·Çroot)ÓÃÀ´½¨Á¢Ò»¸öÁÙʱµÄ·þÎñÆ÷.ÔÚstandaloneģʽÏÂ,ĬÈϼàÌý2121¶Ë¿Ú.Èç¹ûÄãÏëÆôÓÃnonrootÄ£ ʽ,±ØÐëÕâÑù±àÒë,°²×°Èí¼þ(./configure --prefix=... && make install-strip) ,ÔÚǰ׺Ŀ¼Äڻᴴ½¨/sbin, /bin ºÍ/man Îļþ¼Ð.²»¹ý,»¹±ØÐëÌí¼ÓÒ»¸ö/etcĿ¼,(¶ÔÔËÐÐpure-ftpµÄÓû§¿Éд,¿É¶Á).
4.15. --with-pam:
ʹÓÿɲåÈ루pluggable£©Ñé֤ģ¿é.Èç¹û·þÎñÆ÷×ÜÊǾܾøÄãµÄÓû§Ãû/ÃÜÂë,ÄǾͲ»ÒªÓÃÕâ¸öÑ¡Ïî.(²»¹ýÒªÕæµÄ½â¾öÕâ¸öÎÊÌâ,Ó¦¸ÃÐÞÕýPAMÉèÖÃ).ÒªÕýȷʹÓÃPAMÑéÖ¤,µÃ½¨Á¢/etc/pam.d/pure-ftpdÎļþ.ÔÚpamÎļþ¼ÐÏÂÓÐÕâ¸öÎļþµÄ·¶Àý.
4.16. --with-paranoidmsg:
Æ« ºÃ¶àÒɵÄÐÅÏ¢,¶ø²»ÊǶÔϵͳ¹ÜÀíÔ±ÓѺõÄÐÅÏ¢.ÆôÓÃÁËÕâÏîÑ¡Ïîºó,µÇ½ʧ°ÜºóÏÔʾ¸øÓû§ÏàͬµÄÐÅÏ¢,²»¹ÜÎÊÌâµÄ¸ùÔ´.ûÆôÓÃÕâ¸öÑ¡ÏîÇ°,ÃÜÂë´íÎóʱ»áÏÔ Ê¾"Ñé֤ʧ°Ü",¶øµ±Óû§±»ÏµÍ³¹ÜÀíÔ±·â½ûºó»áÏÔʾ"¶Ô²»Æð,ÎÒ²»ÐÅÈÎÄã"(SOrry, I can't trust you!).
4.17. --with-peruserlimits:
ÆôÓÃÿ¸öÓû§µÄ²¢·¢ÏÞÖÆ.Ôڸ߸ººÉµÄ·þÎñÆ÷ÉÏ,²»ÒªÆôÓÃ.
4.18. --with-pgsql:
ʹ Óñ¾µØµÄPostgresÓû§Êý¾Ý¿âÖ§³Ö.µ±ÆôÓôËÑ¡Ïîʱ,»áºöÂÔϵͳÕÊ»§.ÒªÆôÓÃÕâ¸ö¹¦ÄÜ,ÐèÒª°²×°Postgres¿Í»§¿â.Èç¹ûPostgres°²×° ÔÚ×Ô¶¨ÒåµÄ·¾¶,ÄǾÍʹÓÃ--with-pgsql=<directory>Óï·¨.Èç¹ûÐèÒª¸ü¶à¹ØÓÚPostgresºÍPure-FTPdµÄ ÐÅÏ¢,Çë²Î¿¼README.PGSQLÎļþ.
4.19. --with-probe-random-dev:
Pure-FTPdʹÓà /dev/arandom,/dev/urandom»òÕß/dev/randomÓ²¼þÀ´²úÉú²»¿ÉÔ¤²âµÄËæ»úÊý.±àÒëµÄʱºò»á̽²âÕâÀàÓ²¼þÊÇ·ñ´æÔÚ.Èç¹ûÄã ÏëÔÚһ̨Ö÷»úÉϱàÒë³ö¶þ½øÖÆ°ü,È»ºóÔÚÁíһ̨Ö÷»úÉÏÔËÐÐ,Õâ¸öÑ¡Ïî»áʹÔËÐÐʱ̽²âÓ²¼þ.ÕâÔÚLinuxºÍBSDϵͳÉϺÁÎÞÓô¦,µ«ÊÇÔÚSolaris»òÕß QNXÉÏ¿ÉÄÜÐèÒª.
4.20. --with-puredb:
Ö§³ÖÐéÄâÓû§,ÀýÈçÒ»¸ö¶ÀÁ¢ÓÚϵͳÕÊ»§µÄ±¾µØÓû§Êý¾Ý¿â.ÏêÇé²Î¼ûREADME.Virtual-UsersÎļþ.
4.21. --with-quotas:
ÆôÓÃÐéÄâ´ÅÅÌÅä¶î.ÆôÓÃÐéÄâ´ÅÅÌÅä¶îºó,¿ÉÒÔÏÞÖÆÓû§ÔÚÆäÕÊ»§ÄÚ¿ÉÒÔ´´½¨µÄÎļþµÄ×î´óÊýÄ¿.µ±È»Ò²¿ÉÒÔÏÞÖÆ×ܵĴóС.Ïê¼ûÎĵµºóµÄ"´ÅÅÌÅä¶î"²¿·Ö.
4.22. --with-ratios:
Ö§³ÖÉÏ´«/ÏÂÔرÈÀý,ÒÔÌÖºÃÄÇЩw4r3z fr34k2(wares freaks).
4.23. --with-sysquotas:
Ö§³Öϵͳ´ÅÅÌÅä¶î(²»ÊÇPure-FTPdµÄÐéÄâÅä¶î).Ö»ÔÚÕæµÄ´òËãÆôÓÃϵͳ´ÅÅÌÅä¶îʱÆôÓôËÑ¡Ïî.
4.24. --with-throttling:
Ö§³Ö´ø¿íÏÞÖÆ(¼ûÏÂÃæ).
4.25. --with-uploadscript:
´Ó0.98°æ¿ªÊ¼,Pure-FTPdÓµÓÐÁËÒ»¸ö²»´íµÄ´¦ÀíÉÏ´«µÄ¹¦ÄÜ.³É¹¦ÉÏ´«ºó,¿ÉÒÔ×Ô¶¯µ÷ÓÃÍⲿ³ÌÐò»òÕ߽ű¾.ÕâÐèÒªPure-FTPd°ü°²×°µÄÁíÍâÒ»¸ö½Ð×ö"pure-uploadscript"µÄ³ÌÐò.ÏêÇé²Î¼ûÊÖ²á.
4.26. --with-virtualchroot:
ͨ ³£,µ±Óû§µÄ¸ùĿ¼¸Ä±äºó(-AºÍ-aÑ¡Ïî),¾Í²»¿ÉÄÜÌø³öÖ÷Ŀ¼.ÆôÓÃÕâ¸ö¹¦Äܺó,ʹÓû§¿ÉÒÔÌø³ö¸ùĿ¼:¿ÉÒÔ¸úËæ·ûºÅÁ´½Ó,¼´Ê¹ËüÃÇÖ¸ÏòµÄÎļþ¼Ð²»ÔÚ Óû§µÄ¸ùĿ¼ÏÂ.Óй²ÏíÎļþ¼ÐµÄ»°,Õâ¾Í·Ç³£ÓÐÓÃ(ÀýÈç,ÔÚÿ¸öÓû§µÄ¸ùĿ¼Ï¶¼ÓÐÒ»¸öÁ´½Óµ½/var/incomingµÄ·ûºÅÁ´½Ó).Õâ¸ö¹¦ÄÜĬÈÏÇé¿ö ϲ»ÆôÓÃ.
4.27. --with-virtualhosts:
Ö§³ÖÐéÄâÖ÷»ú.ÕâÒâζ×ÅÄã¿ÉÒÔÔÚÿ¸öipµØÖ·¶¼Óв»Í¬µÄÄäÃûFTPÇø. Èç¹ûÄãÖ»ÓÐÒ»¸öip,¾Í²»ÐèÒªÕâ¸ö¹¦ÄÜ.µ«ÊÇÈç¹ûÄãÓжà¸öIPµØÖ·,¶øÇÒÄãÏ£ÍûÒ»¸öÁ¬½Óµ½IP xxxµÄ¿Í»§µÃµ½/etc/pure-ftpd/xxxµÄÄÚÈÝ,¶ø²»ÊÇ~ftp/,ÄǾÍÆôÓÃÕâ¸ö¹¦ÄÜ.Çë²Î¿¼Îļþ½áβµÄ"ÐéÄâ·þÎñÆ÷"²¿·Ö.
4.28. --with-welcomemsg:
¶ÁÈ¡"welcom.msg"ÒÔºÍÆäËûFTP·þÎñÆ÷¼æÈÝ.ÕâÊÇÒ»¸ö°²È«Òþ»¼(ÄäÃûÓû§¿ÉÒÔÉÏ´«"welcome.msg"Îļþ,ËæÒâÌí¼Ó±êʶ).Pure-FTPdĬÈÏÇé¿öÏÂʹÓÃ".banner"Îļþ.
4.29. --with-boring:
ÏÔʾ"¿´ÆðÀ´·Ç³£×¨Òµ"µÄÐÅÏ¢.
display "professionnal-looking" messages.
4.30. --with-privsep:
ÆôÓÃÓÅÏȼ¶·ÖÀë(Ïê¼ûÏÂÃæµÄ×¢ÊÍ)
/-----------------------
"--without-" Ñ¡Ïî
-----------------------/
4.31. --without-ascii:
²»Ö§³Ö7-bits´«Êä(ASCII).Èç¹ûÄãÓÐʹÓÃWindows¿Í»§¶ËµÄÓû§ÓÃËü´«Ëͽű¾ºÍHTMLÎļþ,ÄǾͲ»ÒªÓÃÕâ¸öÑ¡Ïî,²»È»ËûÃÇ»á¶ÔÄã´óºð´ó½Ð.
4.32. --without-banner:
²»ÏÔʾ³õʼ±êÓï.ÓÃÄ£ºý²»ÇåÀ´±£Ö¤·þÎñÆ÷µÄ°²È«,ÆäʵºÜ´À.
4.33. --without-capabilities:
Èç ¹ûÕÒµ½Á˼æÈÝ¿â(libcap),Pure-FTPd»áÊÔͼʹÓÃËüÀ´¼ÓÇ¿°²È«ÐÔ.´ËÑ¡ÏîÎÞÊÓÉÏÊö³¢ÊÔ,À´ºöÂÔ¼æÈÝ¿â.Èç¹û¼æÈÝÐÔÔÚÄãµÄϵͳÉϲ»ÄÜÕýÈ·ÔË ÐÐ,¿ÉÒÔʹÓôËÑ¡Ïî.libcap¿ÉÒÔÔÚftp://ftp.kernel.org/pub/linux/libs/security/linux- privsÏÂÔØ.
4.34. --without-globbing:
²»°üº¬globbing´úÂë.Õâ¿ÉÒÔ¼õÄÚ´æÕ¼ÓÃ,µ«ÕýÔò±í´ïʽҲ²»ÄÜʹÓÃ(ÀýÈç"ls *.rpm").´ó¶àÊýÈ˶¼²»ÓÃ--without-globbing.GlobbingÕâ¸ö¹¦ÄܺܺÃ.
4.35. --without-humor:
Èç¹ûÄãÒ»µã²»²é¿´Ô´´úÂë¾ÍÖªµÀÕâ¸öÑ¡ÏîÊǸÉʲôµÄ,ÄÇÄã¾ÍÌ«×ßÔËÁË.
4.36. --without-inetd:
Èç ¹û×ÜÊÇÒÔstandaloneģʽÔËÐÐPure-FTPd,ÆôÓÃÕâ¸öÑ¡Ïî¿ÉÒÔ½ÚÔ¼Ò»µã´úÂë.²»ÒªÍ¬Ê±ÆôÓÃ--without-inetd ºÍ --without-standalone,ÒòΪÕâÁ½¸öÒ»¸ö¶¼Ã»ÓеĻ°,¾Íû·¨ÔËÐзþÎñÆ÷ÁË.ÔÚPure-FTPdµÄ¶þ½øÖÆ°üÀï,ÕâЩѡÏûÓÐÆôÓÃ,Ëù ÒÔÀàinetdºÍstandaloneģʽ¶¼Ö§³Ö.
4.37. --without-iplogging:
Ϊ±£ÃÜ,²»¼Ç¼ÈκÎIPµØÖ·,ÌرðÓÃÔÚÕþÖÎÐԵķþÎñÆ÷ÉÏ.
4.38. --without-nonalnum:
¶àÒÉ(paranoid)µÄÎļþÃû¼ì²é:Ö»ÔÊÐí»ù±¾µÄ×Öĸ.²»ÒªÃ¤Ä¿µÄÆôÓÃÕâ¸öÑ¡Ïî,²»È»ÄãµÄ¿Í»§»á±§Ô¹µÄ.
4.39. --without-sendfile:
ÔÚLinux,Solaris, HPUXºÍFreeBSDÄÚºËÉÏ,Pure-FTPd³¢ÊÔʹÓÃÒ»¸öÌØÊâϵͳµ÷ÓÃ(sendfile),À´¼õÉÙCPU/ÄÚ´æʹÓÃ.ÔÚ´ó¶àÊýÎļþϵͳÉÏ,Õâ¸ö ¹¦ÄÜÔËÐеIJ»´í.²»¹ý,Õâ¸öÓÅ»¯²¢²»ÊʺÏÏÖÓÐÄں˵ÄËùÓеÄÎļþϵͳ.ÓÐÓû§±¨¸æ˵,ÔÚÔËÐÐPure-FTPdµÄFreeBSDµÄSMBFS(Samba) ÎļþϵͳºÍLinuxÉϵÄNTFSºÍTmpFSϵͳÉÏ,ÏÂÔØÎļþʧ°Ü.(·þÎñÆ÷±¨¸æµÄ´íÎóÊÇ""broken pipe"»ò"Error during write to data connection").Èç¹ûÄã´òËãÔÚÉÏÊöÎļþϵͳÉÏÌṩÎļþ·þÎñ,¾ÍÓ¦¸ÃÆôÓÃ--without-sendfileÑ¡Ïî,ÒÔÈ·±£Õý³£ÔËÐÐ.Óб¨µÀ ³Æ,PA-Risc linuxϵͳҲÐèÒªÕâ¸öÑ¡Ïî.
4.40. --without-shadow:
ºöÂÔshadowÃÜÂë,¼´Ê¹¿ÉÒÔ×Ô¶¯¼ì²âËüÃÇ.Õâͨ³£²¢²»ºÃ,³ý·ÇÄãʹÓÃPAM,LDAP»òÕßSQL.Pure-FTPdÖ§³ÖÓнØÖ¹ÈÕÆÚµÄshadowÃÜÂë(¶ÔÕʺźÍÃÜÂ붼ÓÐЧ).
4.41. --without-standalone:
·þ ÎñÆ÷¿ÉÒÔÒÔstandaloneģʽÕý³£ÔËÐÐ(²»ÒÀÀµÈκγ¬¼¶·þÎñ).Èç¹ûÄã²»ÐèÒªÕâ¸ö¹¦ÄÜ,¶øÇÒÄ㻹Ïë½ÚÔ¼Ò»µã´úÂë,ÄǾͼÓÉÏÕâ¸öÑ¡Ïî.Ïñ g2s,xinetd»òÕßtcpserverÖ®ÀàµÄ³¬¼¶·þÎñ¿ÉÒÔ´úÀíÔËÐÐPure-FTPd·þÎñ.²»¹ý,ÍƼöʹÓÃstandaloneģʽ.
4.42. --without-usernames:
ÔÚÎļþ¼ÐÁбíʱ²»Êä³öÓû§ÃûºÍ×éÃû,Ö»ÏÔʾUIDºÍGID.ÕâÓÐÀûÓÚ°²È«ÐÔºÍÖ´ÐÐ,µ«ÓÐÈËÈÏΪÕâ¶ÔÓû§²»ÓѺÃ.
/--------------
ÆäËû×¢ÒâÊÂÏî
--------------/
4.43. ÆäËû´«Í³µÄautoconfÑ¡ÏȻҲ¿ÉÒÔʶ±ð,ÏñÓÃ"--prefix="À´¸Ä±ä°²×°µÄǰ׺,ĬÈϵÄʱ"/usr/local".¹©²Î¿¼£¬Pure-FTPdµÄ¶þ½øÖƵÄRPM°üÊÇ°´ÕÕÏÂÁÐÃüÁî±àÒëµÄ:
./configure --with-everything --with-paranoidmsg --without-capabilities \
--with-virtualchroot
RPM°ü±àÒëʱ»¹ÓÃÁË --without-pam À´ÔöÇ¿Æä¿ÉÒÆÖ²ÐÔ.
5. STANDALONE INSTALLATION
5.¶ÀÁ¢ÔËÐÐģʽµÄ°²×°
³ý·ÇÄã±àÒë·þÎñÆ÷ʱÌí¼ÓÁË¡°--without-standalone¡±£¬ºÜÈÝÒ×ÔËÐзþÎñÆ÷£¬Ö»ÒªÊäÈ룺
/usr/local/sbin/pure-ftpd &
ÔÚ ÏÂÃæµÄÀý×ÓÀï,ÎÒÃǼÙÉè"pure-ftpd"ÎļþλÓÚ/usr/local/sbin.Èç¹ûÄã×Ô¼º´ÓÔ´Âë°ü±àÒëµÄ·þÎñÆ÷,ÄÇôÕâ¾ÍÊÇĬÈϵÄĿ¼.¿ÉÊÇÕý ÈçÇ°ÎÄËù˵,Èç¹ûÄã°²×°µÄÊǶþ½øÖÆ°ü(RPM,SLP,DEB,TGZ),·þÎñÆ÷Èí¼þ¿ÉÄÜ°²×°ÔÚ/usr/bin.ËùÒÔÖ»ÐèÓÃ/usr/sbin /pure-ftpd´úÌæ/usr/local/sbin/pure-ftpd.
µ±Ç°ÃæµÄÃüÁîÔËÐкó,·þÎñÆ÷»á¼àÌýËùÓнøÈëµÄÁ¬½Ó,ËùÓеÄIPµØÖ·,±ê×¼µÄFTP¶Ë¿Ú(21).Èç¹ûÄãµÄϵͳÓÐIPV6µØÖ·,Ò²¿ÉÒÔÕý³£ÔËÐÐ.
Èç¹ûÄãÏëÔڷDZê×¼¶Ë¿Ú¼àÌýÁ¬½Ó,Ö»ÒªÌí¼Ó"-S"ºÍ¶Ë¿ÚºÅ.
/usr/local/sbin/pure-ftpd -S 42
Ò²ÔÊÐí·þÎñÃû³Æ("-S smtp"»áʹÊØ»¤½ø³Ì½ÓÊÕSMTP¶Ë¿Ú(25)µÄÁ¬½Ó.·Ç³£²»³£¼û,µ«ÎÒÃÇÏ£ÍûÂú×ãÿ¸öÈ˵ÄÒªÇó,¼´Ê¹ËûÄÔ×ÓÓв¡).
Èç¹ûÄãµÄϵͳÓжà¸öIPµØÖ·,¶øÄãÏ£ÍûÄãµÄFTP·þÎñÆ÷Ö»ÄÜ´ÓÆäÖÐÒ»¸öIP(±ÈÈç192.168.0.42)Á¬½Ó,Ó¦¸ÃÔõô°ì?ֻҪʹÓÃÏÂÃæµÄÃüÁîÐÐ:
/usr/local/sbin/pure-ftpd -S 192.168.0.42,
×îºóµÄ¶ººÅºÜÖØÒª,±ðÍüÁË.ʵ¼ÊÉÏ,ËüÊÇÏÂÃæÃüÁîµÄ¼òд:
/usr/local/sbin/pure-ftpd -S 192.168.0.42,21
Èç¹ûÄã¸üϲ»¶ÓÃÖ÷»úÃû³Æ¶ø²»ÊÇIPµØÖ·,ÄÇÄã¿ÉÒÔÕâÑù×ö:
/usr/local/sbin/pure-ftpd -S ftp.rtchat.com,21
µ±È»Ö§³ÖIPv6µØÖ·.
ʹÓÃÇ°ÃæµÄÃüÁîÐÐ,·þÎñÆ÷»á°´ÕÕĬÈϵÄÅäÖÃÔËÐÐ.Èç¹û´æÔÚ½Ð×ö'ftp'µÄϵͳÕʺÅ,¾Í»áÔÊÐíÄäÃûFTPµÇ½;ϵͳÖеÄÓû§¶¼¿ÉÒÔÓÃ×Ô¼ºµÄÓû§Ãû/ÃÜÂëÁ¬½Óµ½FTP·þÎñÆ÷.
Èç¹ûÄãÏë¸Ä±äĬÈÏÅäÖÃ,¿ÉÒÔÌí¼ÓÆäËûµÄÃüÁîÐÐÑ¡Ïî.ÀýÈç:
/usr/local/sbin/pure-ftpd -c 50 &
»òÕß
/usr/local/sbin/pure-ftpd -S ftp.rtchat.com,21 -c 50 &
Õâ Ñù,¾ÍÖ»ÔÊÐíͬʱÓÐ50¸öÁ¬½Ó.ÒªÏëÖªµÀÓÐÄÄЩѡÏî,ÇëÌøµ½ÏÂÃæµÄ"Ñ¡Ïî"Ò»ÕÂ.Èç¹ûÄãµÄ·þÎñÆ÷ÔÚstandaloneģʽÏÂÔËÐеļ«ºÃ,ÄǾͲ»±ØÔĶÁÏ ÃæµÄ¹ØÓÚsuper-severµÄÕ½Ú.µ«ÊÇÈÔÈ»½¨ÒéÔĶÁ"-m"ºÍ"-C"Ñ¡Ïî."-D"Ҳʱ²»´íµÄÑ¡Ïî,Èç¹ûÄã(»òÕßÄãµÄ¿Í»§)ʹÓÃbroken¿Í»§ ¶Ë.Çë¼ÌÐø¶Á.
µ±ÔËÐÐ"ps auxw|grep pure-ftpd"ʱ,½á¹ûÐÎÈç:
root 15211 0.1 0.3 1276 452 ? S 13:53 0:00 pure-ftpd [SERVER]
root 15212 0.1 0.5 1340 672 ? S 13:54 0:00 pure-ftpd [IDLE]
root 15214 0.0 0.5 1340 672 ? S 13:56 0:00 pure-ftpd [DOWNLOADING]
[SERVER]ÊÇÖ÷·þÎñÆ÷.Èç¹ûÄãɱµôÕâ¸ö½ø³Ì,·þÎñÆ÷»áÔÚÏÂÒ»¸öÁ¬½Óºó¹Ø±Õ.
[IDLE]ÏÔʾûÓд«ÊäµÄ¿Í»§.
[DOWNLOADING]ÏÔʾÕýÔÚÏÂÔصĿͻ§.
[UPLOADING]ÏÔʾÕýÔÚÉÏ´«µÄ¿Í»§.
¶Ô¼òµ¥µÄ½Å±¾¼Ç¼,»á´´½¨Îļþ"/var/run/pure-ftpd.pid",ÆäÖаüº¬ÁËÖ÷·þÎñÆ÷½ø³ÌµÄPID.
6. ³¬¼¶·þÎñÆ÷°²×°
Pure- FTPdÄÜÔÚtelnet,wu-ftp,finger»òQmailµÈ³¬¼¶·þÎñµÄ°ïÖúÏÂÔËÐÐ.ʹÓ󬼶·þÎñģʽͨ³£»á±ÈstandaloneģʽÂý.µ«ÊÇ Èç¹ûÄãϲ»¶tcpwrappers»òÕß³¬¼¶·þÎñÄÚÖõĹýÂ˹¦ÄÜ,Pure-FTPdÄܸúËüÃǺÏ×÷µÄºÜºÃ.UnixÏÂÓÐÒ»´ó°ÑµÄ³¬¼¶·þÎñ:Inetd(×î³£ ¼ûµÄ),TCPserver,G2S,Xinetd,Rlinetd...ÕâÀïÖ»½²Ç°ÈýÖÖ,²»¹ýÓÚÆäËûµÄsuper-serversµÄ¼¯³ÉÒ²ºÁÎÞÀ§ÄÑ.
6.1. ÓëInetdͬʱʹÓÃ
×¢ Òâ:Èç¹û°²È«¶ÔÄãÀ´ËµºÜÖØÒª,ÄǾͱðÓÃInetd.ÔÚĬÈϵÄÅäÖÃÏÂ,Èç¹û¶Ôͬһ¸ö¶Ë¿ÚÁ¬½ÓÂʹý¶à,inetdÍ£Ö¹·þÎñ.Õâ¿ÉÒÔÇáÒ×µÄÖÆÔì¾Ü¾ø·þÎñʽ¹¥»÷. ͬʱ,inetdûÓÐÈκεIJ¢·¢ÏÞÖÆ.¼´Ê¹ÄãÏÞÖÆpure-ftpdµÄÁ¬½ÓÊý,¶ñÒâ·Ö×ÓÒ²¿ÉÒÔÕ¼ÂúÄãµÄ´¢´æ¿Õ¼äºÍÃèÊö·û±í(descriptor tables).×îºÃʹÓÃÏÖ´úµÄinetdµÄÌæ´úÆ·,»òÕßÒÔstandaloneģʽÔËÐÐpure-ftpd.
¼ì²éinetdÊÇ·ñÔÚÔËÐÐ:
ps auxw | grep inetd
root 3699 0.0 0.3 1072 492 ? S 15:47 0:00 inetd
±à¼/etc/inetd.conf,Ñ°ÕÒÀàËÆÕâÑùµÄÒ»ÐÐ:
ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd
ÕâÐпÉÄÜÒÔ"proftpd"»òÕß"wuftpd"½áβ,µ«Ó¦¸ÃÒÔ"ftp stream tcp"¿ªÍ·.
ÓÃÏÂÃæµÄÒ»ÐдúÌæÕâÐÐ:
ftp stream tcp nowait root /usr/sbin/tcpd /usr/local/sbin/pure-ftpd
Èç¹ûÄãµÄϵͳÄÚûÓÐ/usr/sbin/tcpd ,³¢ÊÔÏÂÃæµÄÃüÁî:
ftp stream tcp nowait root /usr/local/sbin/pure-ftpd pure-ftpd
ÖØÆôinetdÊØ»¤½ø³Ì:
killall -HUP inetd
Èç¹ûÄãµÄϵͳÀïûÓÐ"killall",ÄǾÍÊÔÓÃ:
kill -HUP $(cat /var/run/inetd.pid)
6.2. ÓëXinetdÒ»ÆðʹÓÃ
ÔÚ/etc/xinetd.confÎļþÖÐÌí¼ÓÏÂÁмǼ:
service ftp
{
socket_type = stream
server = /usr/local/sbin/pure-ftpd
protocol = tcp
user = root
wait = no
disable = no
}
ÔÚRedhatϵͳÖÐ,Äã¿ÉÒÔÔÚ/etc/xinetd.d/pure-ftpdÎļþÖÐÌí¼ÓÕâЩÓï¾ä:
On Redhat systems, you can also put this in a /etc/xinetd.d/pure-ftpd file.
È»ºó,ÖØÆô·þÎñÆ÷:
killall -USR2 xinetd
6.3. ÓëTCPserverһͬʹÓÃ
TCPserverÊÇDan BernsteinµÄucspi-tcp°üµÄÒ»²¿·Ö.Ëü²»ÏñinetdÄÇÑùÅÓ´ó,²»Ò×±»D.O.S¹¥»÷,»¹ÓкܺõĹýÂ˹¦ÄÜ.ÁîPure-FTPdºÍTCPserversһͬÔËÐеÄ×î¼òµ¥µÄ·½·¨ÊÇÏÂÃæµÄÃüÁî:
tcpserver -DHRl0 0 21 /usr/local/bin/pure-ftpd &
Äã ¿ÉÒÔÔÚÄãµÄϵͳµÄ±¾µØÆô¶¯½Å±¾ÉÏÌí¼ÓÉÏÃæµÄÃüÁîÐÐ(ͨ³£ÊÇ/etc/rc.d/boot.local»òÕß/etc/rc.d/rc.local).Èç¹ûÕâ Ñù²»ÐеĻ°,ÓÃtcpserverµÄȫ·¾¶(ÀýÈç'/usr/local/bin/tcpserver')´úÌæ"tcpserver".
6.4. ÓëG2SһͬʹÓÃ
ÔÚ /etc/jnetd.cfÎļþ(»òÕßÈÎÒâÒ»¸öÄãΪG2SÑ¡ÔñµÄÅäÖÃÎļþ)ÖÐÌí¼ÓÈçÏÂÃüÁî:
{
SERVICE ftp
DESCRIPTION "Pure-FTPd"
RUN /usr/local/sbin/pure-ftpd
}
ÖØÆô"jnetd",È»ºó¾Í¸ã¶¨ÁË.
7. Ñ¡Ïî
ÒªÈÃÄãµÄFTP·þÎñÆ÷ÔËÐÐÆðÀ´,Ç°ÃæµÄ²½Öè¾ÍÓ¦¸Ã¹»ÁË.²»¹ýÄã¿ÉÒÔÌí¼ÓһЩÃüÁîÐвÎÊýÀ´¸Ä±äËüµÄ±íÏÖ.ÕâЩ²ÎÊýÓ¦¸ÃÌí¼ÓÔÚsuperserverµÄÅäÖÃÎļþµÄpure-ftpd ·¾¶ºóÃæ.
ÀýÈç,ÄãÏëÌí¼Ó"-s"ºÍ"-a 42"±êÖ¾.super-serverµÄÅäÖÃÐÐÓ¦¸ÃÊÇÕâÑùµÄ,
- Inetd:
ftp stream tcp nowait root /usr/sbin/tcpd /usr/local/sbin/pure-ftpd -s -a42
»òÕß
ftp stream tcp nowait root /usr/local/sbin/pure-ftpd pure-ftpd -s -a42
Èç¹ûÄãʹÓÃInetd,ÔÚ²ÎÊýºÍÑ¡ÏîÖ®¼ä²»ÒªÁôÓпոñ,ÀýÈç,ʹÓà -a42,¶ø·Ç-a 42 .InetdÔÚ´¦Àí´óÁ¿µÄÑ¡ÏîºÍ×Ö·û":"ʱÓеãÂé·³.
- Xinetd:
service ftp
{
socket_type = stream
server = /usr/local/sbin/pure-ftpd
server_args = -s -a 42
protocol = tcp
user = root
wait = no
disable = no
}
- TCPserver:
tcpserver -DHRl0 0 21 /usr/local/bin/pure-ftpd -s -a 42 &
- G2S:
{
SERVICE ftp
DESCRIPTION "Pure-FTPd"
RUN /usr/local/sbin/pure-ftpd -s -a 42
}
Óà »§ÐèÒªÒ»¸öÔÚ/etc/shellsÖÐÁгöµÄshellÀ´»ñµÃÊÜÏÞ»ò·ÇÊÜÏÞµÄFTPÁ¬½Ó.×÷ΪһÖÖÑ¡Ôñ,Äã¿ÉÒÔ¸øÓû§"ftp"×÷Ϊshell.ʹÓà "ftp" shellµÄÓû§Ö»ÄÜʹÓÃFTPµÇ½:²»ÄÜʹÓÃtelnet,²»ÄÜʹÓÃSSH.Èç¹ûÄã²»ÏëÌí¼ÓµÄ»°,ûÓбØÒªÔÚ/etc/shellsÖÐÌí¼Ó"ftp"¼Ç ¼.
ÏÂÃæʱ¿ÉÒÔʶ±ðµÄÑ¡Ïî:
7.1. '-0':
µ±ÎļþÉÏ´«ºó,ÈôÒѾ´æÔÚÏàͬÎļþÃûµÄ¾É°æ±¾,¾ÉµÄÎļþ²»»á ±»ÒƳý,Ò²²»»á±»É¾³ý.ÉÏ´«»á²úÉúÒ»¸öÁÙʱÎļþ,Ò»µ©ÉÏ´«Íê³É,»á×Ô¶¯×ªÏòа汾.ÀýÈç,Èç¹ûÉÏ´«ÁËÒ»¸ö´óÐ͵ÄPHP½Å±¾,web·þÎñÆ÷ÈÔÈ»»á¼ÌÐøÔÚ¾É°æ ±¾ÉÏ·þÎñ;Ò»µ©Õû¸öÎļþ¶¼´«ÊäÍê³É,»áÁ¢¿ÌתÏòа汾.Õâ¸öÑ¡ÏîÓëÐéÄâÅä¶î²»¼æÈÝ.
7.2. '-1':
ÔÚsyslogÊä³öÖмǼÿһ¸ö»á»°µÄPID.
7.3. '-4':
Ö»¼àÌýIPv4Á¬½Ó.Èç¹ûÄãµÄÍøÂç²»ÊÇ´¿µÄIPv6,ÔÚOpenBSD,ISOS,EKKOBSD,MacOS XÉϱØÐëÆôÓÃÕâ¸öÑ¡Ïî.¼´Ê¹Äã´ÓinetdÖ®ÀàµÄ³¬¼¶·þÎñÉÏÆô¶¯·þÎñ.
7.4. '-a <gid>':
ͨ ¹ýÑéÖ¤µÄÓû§×Ô¶¯½øÈëËûÃǵÄÖ÷Ŀ¼ÏÂ,²»Äܵ½±ðµÄµØ·½(chroot).¶ÔÓÚ²»ÄÜ·ÃÎÊshellµÄÓû§À´ËµÓÈÆäÓÐÓÃ,±ÈÈç¶à¸öÓû§¹²ÏíµÄWWWÖ÷»ú·þÎñ. Ö»ÓÐÓµÓÐ×éºÅ<gid>µÄ³ÉÔ±¿ÉÒÔ²»ÊÜÏ޵ķÃÎÊÕû¸öÎļþϵͳ.Òò´Ë,Ìí¼Ó"staff","admin","ftpadmin"×é,°ÑÄãÐÅÈÎ µÄÓû§·Å½øÈ¥.<gid>ÊÇÊý×Ö¸ñʽµÄ×éºÅ,²»ÊÇ×éÃû.
Õâ¸ö¹¦ÄÜÖ÷ҪʱΪϵͳÓû§--²»ÊÇÐéÄâÓû§--Éè¼ÆµÄ.
×¢Òâ:"root(uid 0)"×Ü¿ÉÒÔ·ÃÎÊÕû¸öÎļþϵͳ.Èç¹ûÄãÏëchroot³ýÁËrootÒÔÍâµÄÿ¸öÓû§,ʹÓà -A.
7.5. '-A':
chroot³ýÁËrootÒÔÍâµÄÿ¸öÓû§.
7.6. '-b':
ºöÂÔRFC±ê×¼µÄijЩ²¿·Ö,À´¶Ô¸¶Ò»Ð©ÍêÈ«ÊÜËðµÄFTP¿Í»§¶Ë,»òÕßÊÜËðµÄ·À»ðǽ/NAT boxes.
7.7. '-B':
ÈÃstandalone·þÎñÆ÷ÔÚºǫ́Æô¶¯(±ä³ÉÊØ»¤¾«Áé).
7.8. '-c <number of clients>':
ÔÊÐíÁ¬½ÓµÄ¿Í»§µÄ×î´óÊýÄ¿.ÀýÈç ,"-c 42",ÄÇôͬʱÁ¬½ÓµÄ¿Í»§×î¶àÓÐ42¸ö.ĬÈϵÄ×î´ó¿Í»§ÈÝÁ¿Îª50ÈË.
7.9. '-C <max connection per ip>':
ÏÞ ÖÆͬһIPµÄͬʱÁ¬½ÓÊý.Õâʱ·ÀÖ¹ÓÞ´ÀµÄ¾Ü¾ø·þÎñʽ¹¥»÷µÄÁíÒ»¸öµÄ·½·¨,»¹¿ÉÒÔ·ÀÖ¹´ø¿í±»Ò»¸öµ¥¶ÀµÄÓû§Óùâ.Õâ¸öÑ¡ÏîÖ»ÓÐÔÚ·þÎñÒÔstandalone ģʽÆô¶¯Ê±²Å¿ÉÒÔʹÓÃ(Èç¹ûÄãʹÓ󬼶·þÎñ,ÄǾÍÓ¦¸ÃÒѾÕâÑù×öÁË).Èç¹û·þÎñÆ÷Æô¶¯Ê±Ê¹ÓÃÑ¡Ïî"-C 2",²¢²»Òâζ×Å×ܵÄÁ¬½ÓÊý±»ÏÞÖƵ½2¸ö.¶øÊÇÒ»¸ö¿Í»§¶Ë,´Óͬһ̨»úÆ÷(»òÕßÖÁÉÙÊÇͬһ¸öIP)µÄÁ¬½ÓÊýÖÁ¶àÖ»ÄÜͬʱÓÐ2¸öÁ¬½Ó.Õâ¸ö¹¦ÄÜÐèÒª¶àÏûºÄÒ» µãÄÚ´æÈ¥¼Ç¼IPµØÖ·,²»¹ý»¹ÊÇÍƼöʹÓÃÕâ¸ö¹¦ÄÜ.
7.10. '-d':
Ïòsyslog·¢ËͶàÖÖµ÷ÊÔÐÅÏ¢.Ö»ÔÚÄãÕæµÄÏ£Íûµ÷ÊÔPure-FTPdµÄÇé¿öÏÂÆôÓÃÕâ¸ö¹¦ÄÜ.ÃÜÂë²»»á±»¼Ç¼.˫д"-d"Á¬»ØÓ¦Ò²»á¼Ç¼¡£
7.11. '-D':
ÏÔʾÒÔµã"."¿ªÍ·µÄÎļþ,¼´Ê¹¿Í»§Ã»ÓÐÔÚÁбíÃüÁîÖÐÌí¼Ó'-a'Ñ¡Ïî.ÕâʱΪÁËÄܺÍÅäÖò»Á¼µÄFTP¿Í»§¶Ëһͬ¹¤×÷.Èç¹ûÄãÊÇÒ»¸ö´¿´âÖ÷ÒåÕß,¾Í²»ÒªÆôÓÃÕâ¸öÑ¡Ïî.Èç¹ûÄãÌṩÖ÷»ú·þÎñ,¶øÇÒÄ㻹ÓÐһЩ±¿×¾µÄÓû§,ÄǾÍÆôÓÃÕâ¸öÑ¡Ïî.
7.12. '-e':
Ö»ÔÊÐíÄäÃûÓû§.ÔÚûÓÐÔ¶³ÌFTP·ÃÎÊÕæʵÕÊ»§µÄ¹«¿ªFTP·þÎñÆ÷ÉÏʹÓÃ.
7.13. '-E':
Ö»ÔÊÐíÑéÖ¤µÄÓû§,²»ÔÊÐíÄäÃûÓû§µÇ¼.
7.14. '-f <¹¤¾ß>':
ʹÓÃÕâ¸ö¹¤¾ß À´¼Ç¼ϵͳÈÕÖ¾.ĬÈϵÄΪ"ftp"(Èç¹ûÄãÓв»º¬"ftp"µÄÀÏ°æ±¾libc,Ò²¿ÉÄÜʱ"local2").ʹÓÃ"-f none"Ñ¡Ïî¿ÉÒÔ½ûÓÃÈÕÖ¾.
7.15. '-F <fortune file>':
ÔÚ µÇ¼ʱÏÔʾ¸ñÑÔ.ÕâЩ¾ä×Ó´ÓÎı¾Îļþ<fortune file>ÖÐËæ»ú³éÈ¡.Îı¾ÎļþÓ¦¸Ã±»¸ñʽ»¯Îª±ê×¼µÄ"fortune"Îļþ(ÔÚµ¥Ò»µÄÒ»ÐÐ,¸ñÑÔÓÉ"%"·Ö¸î).ÔÚ±àÒëPure-FTPdʱ,Ó¦ ¸ÃÖ§³Öcookies(--with-cookie).Èç¹ûÄãÖ»ÊÇÏëÔڵǼʱÏÔʾһ¶Î¼òµ¥µÄ±êÓï,ÔÚÕâÄǾÍËæ±ãÌí¼ÓÒ»¸öÎı¾ÎļþµÄÃû×Ö.
7.16. '-g <pid file>':
·þÎñÆ÷ÒÔstandaloneģʽÔËÐÐʱ,¸Ä±äpidÎļþµÄ·¾¶.ĬÈÏΪ/var/run/pure-ftpd.pid.
7.17. '-G':
²»ÔÊÐíÖØÃüÃû.
7.18. '-H':
Ĭ ÈÏÇé¿öÏÂ,¼Ç¼ÍêÈ«µÄÖ÷»úÃû.Ϊ´Ë,DNS²éѯǿÖÆÔËÐÐ."-H"±ê¼Ç·ÀÖ¹Ö÷»úÃûµÄ½âÎö(ÀýÈç,»á¼Ç¼"213.41.14.252",¶ø²» ÊÇ"www.toolinux.com").ÔÚ·±Ã¦µÄ·þÎñÆ÷ÉÏ,Õâ¸ö¹¦ÄÜ¿ÉÒÔÃ÷ÏԵļӿìÁ¬½Ó,¼õÉÙ´ø¿íʹÓÃ.ÕâÔÚ¹«¿ªµÄFTPÕ¾µãÉÏÓÈÆäÐèÒª.ͬʱ±ØÐë×¢ Òâ:²»Ìí¼Ó "-H"ʱ,Ö÷»úÃû¿ÉÒÔÌṩһ¶¨µÄÐÅÏ¢,µ«²»¿ÉÐÅÈÎ:ûÓнøÐÐÄæÏòµÄÓ³Éä¼ì²éÀ´±£´æDNS²éѯ.
7.19. '-i':
²»ÔÊÐíÄäÃûÓû§ÉÏ´«,²»¹ÜÎļþ¼ÐµÄȨÏÞÈçºÎ.Õâ¸öÑ¡Ïî¶ÔÐéÄâÖ÷»úÓÈÆäÓÐÓÃ,¿ÉÒÔ·ÀÖ¹Óû§ÔÚËûÃǵÄÕÊ»§ÉϽ¨Á¢Èí¼þÕ¾µã.
7.20. '-I <timeout>':
¸Ä±ä×î´óµÄ¿ÕÏÐʱ¼ä.¿ÕÏÐʱ¼äÒÔ·ÖÖÓ¼ÆËã,ĬÈÏΪ15·ÖÖÓ.ÏÖ´úµÄFTP¿Í»§¶Ë¿ÉÒÔÿ¸ôÒ»¶Îʱ¼ä·¢ËÍÐé¼ÙµÄÃüÁîÀ´ÆÛƳ¬Ê±É趨.µ±¿Í»§¶Ë¿ÕÏÐʱ¼ä³¬¹ýÁ½±¶µÄÕý³£³¬Ê±Ê±¼äʱ, ÎÒÃÇ»á¶Ï¿ªÕâЩ¿Í»§¶Ë(ÒòΪËüÃÇ»¹ÊǻµÄ).
7.21. '-j':
Èç ¹ûÓû§µÄ¸ùĿ¼²»´æÔÚ,¾Í×Ô¶¯´´½¨.н¨µÄÎļþ¼ÐÊôÓÚ¸ÃÓû§,ȨÏÞÉèÖÃÒÀ¾Ýµ±Ç°Îļþ¼ÐµÄmask.Ö»Äܽ¨Á¢¸ùĿ¼(ËùÒÔ/home/john/. /public_html²»Äܽ¨Á¢,µ«¿ÉÒÔ½¨Á¢/home/john).Ϊ·ÀÖ¹±¾µØ¹¥»÷,¸¸Îļþ¼Ð²»Ó¦¸ÃÊôÓÚÒ»¸ö²»±»ÐÅÈεÄÓû§.ͬʱעÒâ,Äã±ØÐëÐÅÈÎ¹Ü ÀíÓû§Êý¾Ý¿âµÄÈË,ÒòΪÆôÓÃÕâ¸ö¹¦Äܺó,Ëû¿ÉÒÔÔÚ·þÎñÆ÷µÄÎļþϵͳµÄÈκÎλÖô´½¨Îļþ¼Ð»ò¸Ä±äÎļþ¼ÐµÄËùÓÐÕß.
7.22. '-k <°Ù·Ö±È>':
µ±´ÅÅÌ·ÖÇøÒѾÓõôÁË<°Ù·Ö±È>%,¾Í²»ÔÊÐíÉÏ´«.ÀýÈç,"-k 95"¿ÉÒÔ±£Ö¤ÄãµÄ´ÅÅ̿ռ䲻»á±»FTPÓõô³¬¹ý95%.ÔÚÊý×Öºó²»±ØÌí¼Ó°Ù·ÖºÅ(%).
7.23. '-K':
ÔÊÐíÓû§Ðø´«,ÉÏ´«Îļþ,µ«²»ÔÊÐíɾ³ý»òÕßÖØÃüÃû.Ö»ÓÐÔÚÎļþ¼ÐΪ¿ÕµÄÇé¿öϲſÉÒÔɾ³ý.¾¡¹ÜÈç´Ë,ÈÔÈ»ÔÊÐí¸²¸ÇÒÑÓеÄÎļþ(ÓÃÀ´Ö§³ÖÉÏ´«Ðø´«).Èç¹ûÄãÏë·¨Õâ¸öÒ²½ûÖ¹µô,¼ÓÉÏ -r(-- autorename).
7.24. '-l <authentication>' »òÕß'-l <authentication>:<ÅäÖÃÎļþ>':
¸øÑéÖ¤Á´Ìí¼ÓÒ»¸öйæÔò.Çë²Î¿¼READMEÎļþºóÃæµÄ"ÑéÖ¤"²¿·Ö.Õⲿ·ÖºÜÖØÒª.
7.25. '-L <×î´óÎļþÊýÁ¿>:<×î´óµÝ¹éÉî¶È>':
Ϊ·ÀÖ¹ÓÞ´ÀµÄ¾Ü¾ø·þÎñʽ¹¥»÷»òÕß½ö½öÊÇ·ÀÖ¹ºÄ¹âCPU,ÔËÐÐ"ls"ÃüÁîʱ,Pure-FTPdµÄ»ØÏÔ´ÓÀ´²»³¬¹ý2000¸öÎļþ.ͬʱ,µÝ¹éµÄ"ls"(-R)½øÈëµÄ×ÓÎļþ¼ÐÉî¶È²»³¬¹ý5.ÓÃ"-L"Ñ¡Ïî,Äã¿ÉÒÔÔö¼Ó/¼õÉÙÕâÖÖÏÞÖÆ.
7.26. '-m <cpu¸ººÉ>':
ÔÚ¸ºÔس¬¹ý<cpu¸ººÉ>ʱ,²»ÔÊÐíÄäÃûÏÂÔØ.Õâ¸ö¹¦ÄÜ¿ÉÒÔÓÐЧµÄ·ÀÖ¹·þÎñÆ÷¹ýÔØ.²»¹ýÈÔÈ»ÔÊÐíÉÏ´«.
7.27. '-M':
ÔÊÐíÄäÃûÓû§´´½¨Îļþ¼Ð.
7.28. '-n <×î´óÎļþÊýÁ¿>:<×î´ó´óС>':
Èç¹û·þÎñÆ÷±àÒëʱ֧³ÖÐéÄâ´ÅÅÌÅä¶î,¶Ô³ýÊÜÐÅÈεÄ×é³ÉÔ±ÒÔÍâµÄËùÓÐÓû§ÊµÊ©Åä¶îÉèÖÃ.<×î´ó´óС>ÒÔMbΪµ¥Î».Ïê¼ûÎĵµºóÃæµÄ"ÐéÄâÅä¶î"²¿·Ö.
7.29. '-N':
NATģʽ.Ç¿ÖÆACTIVEģʽ.Èç¹ûÄãµÄFTP·þÎñÆ÷ÔÚ²»Ö§³ÖÊÊÓõÄFTP´úÀíµÄNAT boxºóÃæ,»òÕßÄãʹÓÃûÓÐ͸Ã÷FTP´úÀíµÄ¶Ë¿ÚÖض¨Ïò,ÄǾÍʹÓÃËü.Ŷ...Ç°ÃæµÄ¾ä×ÓºÃÏó²»ÊǺÜÇå³þ.ºÃ°É:Èç¹ûÄãµÄÍøÂçÐÎÈç:
(FTP·þÎñÆ÷)-----(NAT/αװÍø¹Ø/·ÓÉÆ÷)-----(»¥ÁªÍø)
¶øÇÒÄãÏ£Íû»¥ÁªÍøÉϵÄÈË¿ÉÒÔ·ÃÎÊÄãµÄFTP·þÎñÆ÷,²»ÓÃÕâ¸öÑ¡ÏîÏÈÊÔÒ»ÊÔ.Èç¹ûNetscape¿Í»§¶ËÁ¬½ÓºÁÎÞÎÊÌâ,ÄÇôNATÍø¹ØÆð×÷ÓÃ.Èç¹ûNetscape²»ÄÜÏÔʾÎļþ¼ÐÁбí,ÄÇÄãµÄNATÍø¹Ø¾Ísucks(²»ÖªµÀÔõô·Òë).Óà "-N"À´Ê¹Æ乤×÷Õý³£.
7.30. '-o':
°ÑËùÓеÄÉÏ´«Îļþдµ½"/var/run/pure-ftpd.upload.pipe",ÒÔʹ"pure-uploadscript"³ÌÐò¿ÉÒÔÔËÐÐ.Ö»ÔÚÄãÕæµÄʹÓÃ"pure-uploadscript"µÄÇé¿öÏÂÆôÓÃ.
7.31. '-O <¸ñʽ>:<ÈÕÖ¾Îļþ>':
°Ñ ËùÓеÄÎļþ´«ÊäÒÔ¿ÉÑ¡µÄ¸ñʽдµ½Ò»¸öÌض¨µÄÈÕÖ¾ÎļþÖÐ.Ä¿Ç°,Ö§³ÖÈýÖÖ¸ñʽ:CLF(ÀàËÆApache),StatsºÍW3C.Èç¹ûÄãÔÚÆô¶¯Ñ¡ÏîÉÏÌí ¼Ó"-O clf:/var/log/pureftpd.log",Pure-FTPd»á°Ñ´«ÊäÒÔÀàËÆApacheÍøÂç·þÎñÆ÷ĬÈÏÅäÖõĸñʽ¼Ç¼µ½/var/log /pureftpd.log.Èç¹ûÄãÔÚÆô¶¯Ñ¡ÏîÉÏÌí¼Ó"-O clf:/var/log/pureftpd.log",Pure-FTPd»á´´½¨ÌØÊâ¸ñʽµÄÈÕÖ¾Îļþ,רÃÅÓÃÓÚͳ¼Æ±¨¸æ.Stats¸ñʽÊÇÒ»ÖÖѹËõ¸ñ ʽ,±ÈCLF¸ñʽºÍÀϵÄ"xferlog"¸ñʽ¸üÓÐЧ,¸ü¾«È·.
Stats¸ñʽÊÇÕâÑùµÄ:
<ÈÕÆÚ> <»á»°id> <Óû§> <ip> <U»òD> <´óС> <³ÖÐøʱ¼ä> <Îļþ>
<ÈÕÆÚ>ÊÇGMTʱ¼ä´Á(time()),<»á»°id>Ó뵱ǰ»á»°Ò»ÖÂ.<Îļþ>²»±»ÒýÓÃ,Ëü³£³£ÊÇÈÕÖ¾ÎļþµÄ×îºóÒ»Ïî.
"U" ´ú±í"ÉÏ´«"(Upload) ,"D" ´ú±í"ÏÂÔØ"(Download).
¾¯¸æ:»á»°idÖ»ÊÇΪÁËͳ¼Æ¶øÉè¼ÆµÄ.ËäÈ»ÔÚʵ¼ÊÉÏ×ÜÓÐΨһµÄ×Ö·û´®,µ«ÀíÂÛÉÏÔÚһЩº±¼ûµÄÇéÐÎÖÐËü²¢²»Î¨Ò».Òò´Ë,Èç¹ûÈÎÎñÌõ¼þºÜ¿Á¿Ì,¾Í²»ÒªÒÀÀµÕâÖÖ¶«Î÷.
ÓÐÒ»¸ö½Ð"pure-statsdecode"µÄÃüÁî¿ÉÒÔÓÃÀ´°Ñʱ¼ä´Áת»»ÎªÈËÀà¿É¶ÁµÄÈÕÆÚ.
ÒªÆôÓÃW3C¸ñʽ,ʹÓÃ:-O w3c:/var/log/pureftpd.log
Ϊ°²È«Æð¼û,·¾¶±ØÐëÊǾø¶Ô·¾¶(ÀýÈç,ÓÃ/var/log/pureftpd.log,¶ø²»ÊÇ../log/pureftpd.log).
Èç¹ûÈÕÖ¾´¢´æÔÚNFS¾íÀï,±ðÍüÁËÆô¶¯lock¹ÜÀíÆ÷(ͨ³£½Ð"lockd"»òÕß"rpc.lockd").
7.32. '-p <Æðʼ¶Ë¿Ú>:<½áÊø¶Ë¿Ú>':
ÔÚ±»¶¯Ä£Ê½µÄÏÂÔØʱ,Ö»ÆôÓÃÔÚ<Æðʼ¶Ë¿Ú>ºÍ<½áÊø¶Ë¿Ú>Ö®¼äµÄ¶Ë¿Ú.µ±·þÎñÆ÷ÔÚûÓÐFTPÁ¬½Ó×·×ٵķÀ»ðǽºóÃæʱ,Õâ¸ö·Ç³£ÓÐÓÃ.ʹÓÃÒ»°ã·þÎñ¶¼²»»á¼àÌýµÄ¸ß¶Ë¿Ú(ÀýÈç40000-50000).
7.33. '-P <ipµØÖ·/Ö÷»úÃû>':
ΪPASV/EPSV/SPSVÃüÁîÇ¿ÖÆÌض¨µÄIPµØÖ·.Èç¹û·þÎñÆ÷ÔÚ²»ÄÜ´¦Àístateful FTPαװµÄ(NAT)boxºóÃæ,¾Í°ÑboxµÄIPµØַдÔÚÕâ¶ù.Èç¹ûÄãÓж¯Ì¬IP,¾Í°ÑÄãÍø¹ØµÄ¹«¿ªµÄÖ÷»úÃûдÉÏ,ÿ´ÎÓÐпͻ§Á¬½Óʱ»á½âÎöµÄ.
7.34. '-q <ÉÏ´«±ÈÀý>:<ÏÂÔرÈÀý>':
¶ÔÄäÃûÓû§ÆôÓÃÉÏ´«/ÏÂÔرÈÀý.
7.35. '-Q <ÉÏ´«±ÈÀý>:<ÏÂÔرÈÀý>':
¶Ôÿ¸öÓû§(²»ÂÛÄäÃûÓë·ñ)¶¼ÆôÓÃÏÂÔØ/ÉÏ´«±ÈÀý.
root(0,ÓÐʱ½Ð×ö"wheel"),ûÓбÈÀýÏÞÖÆ.1
7.36. '-r':
´Ó²»¸²¸ÇÒÑÓеÄÎļþ.Èç¹ûÉÏ´«Ò»¸öÎļþÓëÒÑÓеÄÎļþͬÃû,»á×Ô¶¯ÖØÃüÃû.ÎļþÃûΪxyz, xyz.1, xyz.2, xyz.3µÈ.
×¢Òâ:Èç¹ûÄãÔÚ±àÒëµÄʱºòʹÓÃ"make AUTORENAME_REVERSE_ORDER=1",ÃüÃû¹æÔò»á·´¹ýÀ´.ÎļþÃû±äΪ1.xyz, 2.xyz, 3.xyzµÈ.
7.37. '-R':
²»ÔÊÐíÓû§(°üÀ¨·ÇÄäÃûÓû§)ʹÓÃCHMODÃüÁî.ÔÚÖ÷»ú·þÎñÉÏ,Õâ¿ÉÒÔ·ÀÖ¹ÐÂÊÖ·¸´í,±ÈÈçÔÚ¸ùĿ¼ÉèÖò»Ç¡µ±µÄȨÏÞ.µ±"-R"Ñ¡ÏîÆôÓÃʱ,Ö»ÓÐroot¿ÉÒÔʹÓÃCHMODÃüÁî.
7.38. '-s':
"Èí¼þ±£»¤".²»ÔÊÐíÄäÃûÓû§ÏÂÔØÊôÓÚ"ftp"µÄÎļþ.(ͨ³£,ÕâЩÎļþÊÇÆäËûÄäÃûÓû§ÉÏ´«µÄ).ÕâÑù,ÉÏ´«±ØÐëͨ¹ýϵͳ¹ÜÀíÔ±µÄÅú×¼(¸Ä±äÎļþµÄËùÓÐÕß),²Å¿ÉÒÔÏÂÔØ.
7.39. '-S [<ipµØÖ·>,|<Ö÷»úÃû>,] [<¶Ë¿Ú>|<·þÎñÃû³Æ>]'.
Ö»Óе±·þÎñÆ÷ÒÔstandaloneģʽÆô¶¯Ê±,Õâ¸öÑ¡Ïî²ÅÓÐЧ.ÔÚÌض¨µÄIPºÍ¶Ë¿Ú½ÓÊÕÁ¬½Ó.IPv4ºÍIPv6¶¼Ö§³Ö.Êý×ÖºóÕßÖ÷»úÃûµÄÈ«³Ì¶¼¿ÉÒÔ½ÓÊÜ.·þÎñÃû³Æ(ÔÚ/etc/services)¿ÉÒÔÓÃÀ´´úÌæÊý×ֵĶ˿Ú.
7.40. '-T <´ø¿í>' ºÍ '-t <´ø¿í>':
ÆôÓôø¿íÏÞÖÆ(Ïê¼ûÏÂÃæ).<´ø¿í>ÒÔkb/sΪµ¥Î».Òª·Ö±ðÉèÖÃÉÏ´«/ÏÂÔØ ´ø¿í,¿ÉÒÔʹÓÃ[<ÉÏ´«>]:[<ÏÂÔØ>]Óï·¨.
7.41. '-u <uid>':
²»ÔÊÐíuidµÍÓÚ<uid>µÄÓû§µÇ¼."-u 1"²»ÔÊÐíÒÔrootµÇ¼(ÕâÊÇ°²È«µÄ).ÔÚ´ó¶àÊýµÄlinux·¢²¼°æ±¾ÖÐ,"-u 100"²»ÔÊÐí·ÃÎÊÐéÄâÕÊ»§.
7.42. '-U <ÎļþµÄumask>:<Ŀ¼µÄumask>':
¸Ä ±äÎļþ´´½¨ÑÚÂë.ĬÈÏֵΪ133:022.Èç¹ûÄãÏ£ÍûijÓû§ÉÏ´«µÄÐÂÎļþÖ»¶Ô¸ÃÓû§¿É¶Á,ʹÓÃ"-U 177:077".Èç¹ûÄãÏ£ÍûÉÏ´«µÄÎļþ¿ÉÖ´ÐÐ,ʹÓÃ022:022(Îļþ¶ÔÆäËûÓû§¿É¶Áµ«²»¿Éд)»òÕß077:077(ÎļþÖ»¶ÔËùÓÐÕ߿ɶÁ,¿ÉÖ´ÐÐ). Çë×¢Òâ,Pure-FTPdÖ§³ÖSITE CHMOD,Òò´ËÓû§¿ÉÒԸıä×Ô¼ºÎļþµÄËùÓÐÕß.
'-V <ipµØÖ·>':
Ö»ÔÚÕâ¸öÌض¨µÄIPµØÖ·ÔÊÐí·ÇÄäÃûFTP·ÃÎÊ.ËùÓÐÆäËûµÄIPµØÖ·¶¼½ö½öÄäÃû.ÆôÓÃÕâ¸öÑ¡Ïîºó,¿ÉÒÔÓÃrouted IPÌṩ¹«¿ªµÄ·ÃÎÊ,Óñ¾µØIPÀ´¹ÜÀí.ͬÑù,Ò²¿ÉÒÔÓÃÔÚ·À»ðǽ¹æÔò±£»¤ÏµĿÉ·ÓɵÄÐÅÈÎIPÀ´×¨ÃÅÌṩ·ÇÄäÃûÓû§µÄµÇ¼.
7.43. '-w':
Ö»¶Ôͨ¹ýÑéÖ¤µÄÓû§ÌṩFXPÐÒéÖ§³Ö.FXPÔÚIPv4ºÍIPv6µØַ϶¼¿ÉÒÔ¹¤×÷.
7.44. '-W':
Ö§³ÖFXPÐÒé.FXPÔÊÐíÁ½¸öÔ¶³Ì·þÎñÆ÷»¥Ïà´«Êä,µ«Ã»ÓÐÈκÎÊý¾ÝÁ÷ÏòÒªÇó´«ÊäµÄ¿Í»§¶Ë.
µ«ÊÇ×¢Òâ:
****************************************************************************
FXPÐÒé²¢²»°²È«(µÚÈý·½Ö÷»ú¿ÉÒÔÇÔÈ¡µ±Ç°Á¬½Ó).ÔÚPure-FTPdÖÐ,ÒѾ²ÉÈ¡Ô¤·À´ëÊ©À´¼õÉÙFXP²åÈë¹¥»÷.µ«ÊÇÈç¹ûÄãµÄFTP·þÎñÆ÷Ìṩ˽È˵ÄÊý¾Ý:
ǧÍò²»ÒªÔÊÐíFXPÁ¬½Óµ½·ÇÐÅÈεÄÖ÷»úÉÏ.Äã¿ÉÒÔÔÚÄÚÍø·þÎñÆ÷ÉÏʹÓÃFXP,µ«²»ÄÜÈÃFXPÁ¬½Óµ½InternetÓû§.
****************************************************************************
Òò´Ë,Pure-FTPdĬÈϲ»ÆôÓÃFXP,³ý·ÇÄãÓÃ"-W"»òÕß"-w"Ã÷È·µÄÆôÓÃ.
7.45. '-x':
ÔÚ Õý³£µÄ²Ù×÷ģʽÏÂ,ͨ¹ýÑéÖ¤µÄÓû§¿ÉÒÔ¶Á/дÒÔµã('.')¿ªÍ·µÄÎļþ.ΪÁË°²È«µÄÔÒò(±ÈÈç˵¸Ä±ä±êÓï,»òÕßij¸ö±»ÒÅÍüµÄ.rhostsÎļþ),ÄäÃûÓà »§²»ÄÜÕâÑù.ʹÓÃ"-x"ºó,ͨ¹ýÑéÖ¤µÄÓû§¿ÉÒÔÏÂÔصãÎļþ,µ«²»Äܸ²¸Ç»òÕß´´½¨,¼´Ê¹ËûÃÇÊÇÎļþµÄËùÓÐÕß.ÕâÑù,Äã¾Í¿ÉÒÔ·ÀÖ¹Ö÷»úµÄʹÓÃÕß °Ñ.qmailÎļþ¸ãµÄÂÒÆß°ËÔã.Èç¹ûÄãÏ£ÍûÈÃÓû§·ÃÎÊij¸öµãÎļþ,¾Í´´½¨Ò»¸öÁ´½Óµ½µãÎļþµÄ·ûºÅÁ¬½Ó.·ûºÅÁ´½ÓµÄÎļþÃûÖÐûÓеã.ÕâÑù,¿Í»§¾Í¿ÉÒÔͨ¹ý Á´½Ó¼ìË÷Îļþ.
7.46. '-X':
Õâ¸ö±êÖ¾ÓëÇ°Ò»¸öÏàͬ(²»ÔÊÐíдµãÎļþ),²»¹ý,Õâ¸ö±êÖ¾µÄ¸½´øЧ¹ûʹÓû§ÉõÖÁ²»ÄÜ*¶ÁÈ¡*ÒԵ㿪ͷµÄÎļþºÍĿ¼(ÀýÈç"cd .ssh").
****************************************************************************
ºÍ"-a"Ñ¡ÏîһͬʹÓÃʱ,ÊÜÐÅ×é³ÉÔ±¿ÉÒÔ²»ÊÜ"-x/-X"µÄÏÞÖÆ.
****************************************************************************
7.47. '-y <×î´óÓû§ÊýÁ¿>:<×î´óÄäÃûµÇ¼ÊýÁ¿>':
Ö»Óе±·þÎñÆ÷±àÒëʱ¼ÓÁË"--with-peruserlimits",Õâ¸öÑ¡Ïî²Å¿ÉÒÔʹÓÃ.´ËÑ¡ÏîÏÞÖÆÁËÒ»¸öÓû§¿ÉÒÔͬʱʹÓõĻỰµÄÊýÁ¿.
¿ÕÖµ("0")Òâζ×Å"ÎÞÏÞ".
Õâ¶ùÊǸö¾ßÌåµÄÀý×Ó:
/local/sbin/pure-ftpd -y 3:20 -c 15 -C 5 ¨CB
Õâ¶ù,ÔÊÐí:
*×î¶à×ܹ²15¸ö»á»°
*´Óͬһ¸öIPµÄÁ¬½Ó×î¶à5¸ö
*ͬһ¸öÓû§ÃûÖ»ÄÜÓÐ×î¶à3¸öÁ¬½Ó
*×î¶à20¸öÄäÃûÓû§
ÕâÑùÉèÖúó,µ¥¶ÀµÄÒ»¸öÓû§¾Í²»»áÄÇôÈÝÒ×Õ¼ÂúËùÓеÄλÖÃ.
7.48. '-Y 0':
½ûÓÃSSL/TLS¼ÓÃܲã(ĬÈÏ).
'-Y 1':±ê×¼»á»°ºÍ¼ÓÃܻỰ¶¼½ÓÊÜ
'-Y 2': ¾Ü¾ø²»Ê¹ÓÃSSL/TLS°²È«¼ÓÃÜ»úÖƵÄÁ¬½Ó,°üÀ¨ÄäÃû»á»°.·þÎñÆ÷±àÒëʱ±ØÐëÓÃ" --with-tls",¶øÇÒ±ØÐëÓÐÓÐЧµÄÖ¤ÊéÀ´ÆôÓÃÕâ¸ö¹¦ÄÜ.
ÏêÇé²Î¿¼¹ØÓÚSSL/TLSµÄREADME.TLSÎļþ.
7.49. '-z':
ÔÊÐíÄäÃûÓû§¶ÁÈ¡ÒÔµã('.')¿ªÍ·µÄÎļþºÍĿ¼.
7.50. '-Z':
¾¡Á¦±£»¤Óû§,·ÀÖ¹Æä·¸³£¼ûµÄ´íÎó,ÃâµÃ¼¼ÊõÖ§³ÖÈËԱæ×Å´¦Àí¸÷ÖÖÓÞ´ÀµÄÎÊÌâ.ÏÖÔÚ,"-Z"Ñ¡Ïî·ÀÖ¹Óû§´íÎóÔËÐÐ"chmod"ÃüÁî,(Õâ¿ÉÄܵ¼ÖÂËûÃDz»ÄÜ·ÃÎÊÊôÓÚ×Ô¼ºµÄÎļþ/Îļþ¼Ð).ÒÔºó,Õâ¸öÑ¡Ïî¿ÉÄÜ»á¼ÓÈëÆäËûµÄ¹¦ÄÜ.Èç¹ûÄãÌṩÖ÷»ú,ÄǾͿªÆôÕâ¸ö¹¦ÄÜ.
Èç¹ûºÍ±ê׼ѡÏîÏë±È,Äã¸üϲ»¶GNU·ç¸ñµÄ³¤Ñ¡Ïî,¿ÉÒÔÓÃÏÂÁеıðÃû.ÄãËæʱ¶¼¿ÉÒÔÊäÈë"pure-ftpd --help"À´»ñÈ¡Õâ¸öÁбí.
7.51. ±ê׼ѡÏ°´×Öµä˳ÐòÅÅÐò
-0 --notruncate
-1 --logpid <Îļþ>
-4 --ipv4only
-a --trustedgid <gid>
-A --chrooteveryone
-b --brokenclientscompatibility
-B --daemonize
-c --maxclientsnumber <Êý×Ö>
-C --maxclientsperip <Êý×Ö>
-d --verboselog
-D --displaydotfiles
-e --anonymousonly
-E --noanonymous
-f --syslogfacility <ËùÓù¤¾ß>
-F --fortunesfile <Îļþ>
-g --pidfile <pidÎļþµÄ·¾¶>
-G --norename
-h --help
-H --dontresolve
-i --anonymouscantupload
-I --maxidletime <ʱ¼ä (·Ö)>
-j --createhomedir
-k --maxdiskusagepct <°Ù·Ö±È>
-K --keepallfiles
-l --login <auth> »ò <auth>:<ÅäÖÃÎļþ>
-L --limitrecursion <Êý×Ö:Êý×Ö>
-m --maxload <ϵͳ¸ººÉ>
-M --anonymouscancreatedirs
-N --natmode
-o --uploadscript
-O --altlog <¸ñʽ>:<ÈÕÖ¾Îļþ>
-p --passiveportrange <×îµÍ¶Ë¿Ú:×î¸ß¶Ë¿Ú>
-P --forcepassiveip <ipµØÖ·>
-q --anonymousratio <ÉÏ´«±ÈÀý>:<ÏÂÔرÈÀý>
-Q --userratio <ÉÏ´«±ÈÀý>:<ÏÂÔرÈÀý>
-r --autorename
-R --nochmod
-s --antiwarez
-S --bind <ip µØÖ·£¬¶Ë¿Ú>
-t --anonymousbandwidth <´ø¿í (KB/s)>
-T --userbandwidth <´ø¿í (KB/s)> »ò [<ÉÏ´«´ø¿í>]:[<ÏÂÔرÈÀý>]
-u --minuid <uid>
-U --umask <mask>
-V --trustedip <ipµØÖ·>
-w --allowuserfxp
-W --allowanonymousfxp
-x --prohibitdotfileswrite
-X --prohibitdotfilesread
-y --peruserlimits <ÿ¸öÓû§×î´ó»á»°Êý>:<ÄäÃûÓû§×î´ó»á»°Êý>
-Y --tls <0:no TLS | 1:TLS+cleartext | 2:enforce TLS>
-z --allowdotfiles
-Z --customerproof
7.52.GNU·ç¸ñ³¤Ñ¡Ï°´×ÖµäÅÅÐò
-W --allowanonymousfxp
-z --allowdotfiles
-w --allowuserfxp
-O --altlog <¸ñʽ>:<ÈÕÖ¾Îļþ>
-t --anonymousbandwidth <´ø¿í (KB/s)>
-M --anonymouscancreatedirs
-i --anonymouscantupload
-e --anonymousonly
-q --anonymousratio <ÉÏ´«±ÈÀý>:<ÏÂÔرÈÀý>
-s --antiwarez
-r --autorename
-S --bind <ipµØÖ·£¬¶Ë¿Ú>
-b --brokenclientscompatibility
-A --chrooteveryone
-j --createhomedir
-Z --customerproof
-B --daemonize
-D --displaydotfiles
-H --dontresolve
-P --forcepassiveip <ipµØÖ·>
-F --fortunesfile <Îļþ>
-h --help
-4 --ipv4only
-K --keepallfiles
-l --login <auth> or <auth>:<ÅäÖÃÎļþ>
-1 --logpid <file>
-L --limitrecursion <Êý×Ö:Êý×Ö>
-c --maxclientsnumber <Êý×Ö>
-C --maxclientsperip <Êý×Ö>
-k --maxdiskusagepct <°Ù·Ö±È>
-I --maxidletime <ʱ¼ä£¨·Ö£©>
-m --maxload <ϵͳ¸ººÉ>
-u --minuid <uid>
-N --natmode
-E --noanonymous
-R --nochmod
-G --norename
-0 --notruncate
-p --passiveportrange <×îС¶Ë¿Ú£º×î´ó¶Ë¿Ú>
-y --peruserlimits <ÿ¸öÓû§×î´ó»á»°Êý>:<ÄäÃûÓû§×î´ó»á»°Êý>
-g --pidfile <µ½pidÎļþµÄ·¾¶>
-X --prohibitdotfilesread
-x --prohibitdotfileswrite
-f --syslogfacility <¹¤¾ßÃû³Æ>
-Y --tls <0:no TLS | 1:TLS+cleartext | 2:enforce TLS>
-a --trustedgid <gid>
-V --trustedip <ipµØÖ·>
-U --umask <mask>
-o --uploadscript
-T --userbandwidth <´ø¿í(KB/s)> or [<ÉÏ´«´ø¿í>]:[<ÏÂÔØ´ø¿í>]
-Q --userratio <ÉÏ´«±ÈÀý>:<ÏÂÔرÈÀý>
-d --verboselog
8. ½¨Á¢ÄäÃûFTP·þÎñÆ÷
Èç ¹û´æÔÚ"ftp"Óû§,¶øÇÒ´ËÓû§µÄÖ÷Ŀ¼¿ÉÒÔÁ¬½Ó£¬Pure-FTPd¾Í»á½ÓÊÜÄäÃûµÇ¼,Óû§ÃûΪ"ftp"»òÕß"anonymous".Îļþ±ØÐëλÓÚ FTPÖ÷Ŀ¼.²»ÐèÒªÓÐ"bin", "lib", "etc"ºÍ"dev"Ŀ¼,Ò²²»ÐèÒªÈκÎÍⲿ³ÌÐò.²»Òª°Ñ¹«¹²ÎļþµÄËùÓÐÕ߸ÄΪ"ftp",Ö»¸Ä¿ÉдµÄÎļþ¼Ð("incoming").
9. ÏÔʾ±êÓï
Èç¹ûÔÚ"ftp"Óû§µÄ¸ùĿ¼(»òÕßÐéÄâ·þÎñÆ÷µÄ¸ùĿ¼,¼ûÏÂÃæ)ÓÐ".banner"Îļþ,µ±¿Í»§µÇ¼µÄʱºò,¾Í»áÏÔʾ.Äã¿ÉÒÔ°Ñ´øÓÐÄãµÄÃû×ÖµÄÓÃASCIIÒÕÊõ×öµÄlogo·Å½øÈ¥.
Õâ¸öÎļþ²»Ó¦´óÓÚ4000byte,·ñÔò¾ÍÎÞ·¨ÏÔʾ.
ÔÚÿ¸öÎļþ¼Ð,¿ÉÄÜÓÐ".message"Îļþ.ÕâÀïµÄÄÚÈݽ«ÔÚ¿Í»§½øÈëĿ¼µÄʱºòÏÔʾ.ÕâÑùµÄÎļþ¿ÉÄÜ°üº¬Ò»Ð©ÖØÒªÐÅÏ¢(ÀýÈç"²»ÒªÏÂÔØ1.7°æ,²»ÄÜÓÃ")
10.ÏÔʾ¸ñÑÔ
ÔÚ ×î³õµÇ¼ʱ,¿ÉÒÔËæ»úÏÔʾһЩÓÐȤµÄ¶«Î÷.Ëæ»úµÄ¸ñÑÔ´ÓÒ»¸ö±ê×¼µÄ"fortune"¸ñʽµÄÎı¾ÎļþÖÐÌáÈ¡.Èç¹ûÄã°²×°ÁË"fortune"°ü,Ó¦¸ÃÓÐÒ» ¸ö°üº¬¶þ½øÖÆÎļþ(xxxx.dat)ºÍÎı¾Îļþ(²»º¬.datÀ©Õ¹Ãû)µÄĿ¼(ͨ³£ÊÇ/usr/share/fortune).
ҪʹÓÃPure-FTPd cookies,Ö»ÒªÔÚ"-F"Ñ¡Ïîºó¼ÓÉÏÎı¾ÎļþµÄÎļþÃû.ÀýÈç:
/usr/local/sbin/pure-ftpd -F /usr/share/fortune/zippy
Èç¹ûÄãÏ뽨Á¢×Ô¼ºµÄ¸ñÑÔÎļþ,Ö»Òª½¨Á¢Ò»¸ö½á¹¹ÈçϵÄÎı¾Îļþ:
Hello... this is the first fortune...
%
Welcome to the real world.
%
Follow the white rabbit.
%
Have fun...
Well... lotsa fun!
%
Yop is good for you.
ѧ»áÁË°É?ÔÚͬһÐÐÖÐ,¸ñÑÔÖ®¼äÓÃ"%"¸ô¿ª.²»¹ý¸ñÑÔ±¾Éí¿ÉÒÔÓкܶàÐÐ.(²Î¿¼µÚËĸöÀý×Ó)
Ϊ°²È«ÔÒò,Îı¾Îļþ±ØÐë¶ÔÿÈ˿ɶÁ.(Èç¹ûÓбØÒª,¸Ä±äÎļþµÄȨÏÞÉ趨 chmod 644 ),·ñÔò·þÎñÆ÷»áºöÂÔÎļþ.
µ±È»,¸ñÑÔÎļþ¿ÉÒÔÖ»Óе¥¶ÀµÄÒ»ÌõÐÅÏ¢.
11. PER-USER CHROOT() RULES
³ýÁË"-a"±ê¼Ç,Pure-FTPd»¹ÓÐÁíÍâÒ»¸öµ÷½Ú¾«Ï¸µÄchroot¹æÔò.ÀýÈçµÇ¼ /etc/passwd
mimi:x:501:100:Mimi:/home/mimi:/bin/zsh
ûÓÐÌØÊâµÄ¹æÔòʱ,mimi¾ÍÄܵǼ²¢ÇÒ¼ìË÷ÎļþϵͳÖÐÈκι«¿ª¿É¶ÁµÄÎļþ.ÏÖÔÚ,ÎÒÃÇÀ´¸Ä±äÆä¸ùĿ¼.
mimi:x:501:100:Mimi:/home/mimi/./:/bin/zsh
È» ºóÄØ?mimiµÄ¸ùĿ¼ûÓб仯,³£¹æµÄÓ¦Óò»»á·¢ÏÖÈκÎÒì³£,²»¹ýPure-FTPdÀí½â"chroot() until /./".Òò´Ë,µ±mimiÏ´νøÐÐFTPµÇ¼ʱ,Ö»Äܵ½´ï/home/mimiÎļþ¼Ð,¶ø²»ÊÇÕû¸öÎļþϵͳ.Èç¹û²»Ï²»¶"-a"Ñ¡Ïî»òÕßÊÜÐÅgidÖ® Àà,Õâµ¹ÊǸøijЩÓû§chrootµÄºÃ·½·¨.ÁíÍâÒ»¸ö¼¼ÇÉʱÔÚ"/./"ºóÌí¼ÓһЩ¶«Î÷.
mimi:x:501:100:Mimi:/home/mimi/./public_html:/bin/zsh
µ±mimiµÇ¼ʱ,»á·¢ÉúÁ½¼þÊÂ:
-chroot("/home/mimi"),ÕâÑùMimiÖ»ÄÜ¿´µ½×Ô¼º¸ùĿ¼ÄڵĶ«Î÷,¿´²»µ½±ðµÄ¶«Î÷.
-chdir("public-html"),ÕâÑù»á»°¾Í»á´Ópublic_htmlÎļþ¼Ð¿ªÊ¼.
ÈÔÈ»¿ÉÒÔʹÓÃ"cd .."
ÕâÖÖ"url·ç¸ñ"µÄ´¦Àí¶ÔÖ»ÓÃFTPµÇ¼µÄÓû§(¾ÍÊÇûÓÐshell·ÃÎʵÄÓû§)ÓÈÆäÁé»î.
µ±Óû§±»chrootʱ¼ÓÁË"/./",²¢ÇÒËûÊôÓÚÊÜÐÅ×é(-a),Ëû¾Í»á±»chroot.µ«ËûûÓбÈÀýÏÞÖÆ,²¢¿ÉÒÔ·ÃÎʵãÎļþ.
12.±ÈÂÊ
Èç¹ûÄãÏëÇ¿ÆÈÈËÃÇÔÚÏÂÔض«Î÷µÄ֮ǰÉÏ´«ÐÂÎļþ,¿ÉÒÔʹÓñÈÂÊ.
ÔÚ¹«¿ªµÄFTP·þÎñÆ÷ÉÏ,ÓÃÕâÖÖ·½·¨¿ÉÒԵõ½ºÜ¶àж«Î÷.¶ÔÓÚÈí¼þ½»»»Õß,ÕâÔòÊDZØÐëµÄ.ÎÒ²»Ï²»¶ÕâÒ»Ì×,²»¹ý...Pure-FTPdÉè¼ÆµÄʱºò¾ÍÊÇÒªÂú×ãËùÓеÄÈË.
ÒªÆôÓñÈÂÊ,ʹÓÃ"-q"Ñ¡Ïî,ºóÃæ¼ÓÉÏÉÏ´«:ÏÂÔرÈÂÊ:
-q 2:5
ÕâÒâζÕâÿ¸öÄäÃûÓû§±ØÐëÉÏ´«ÖÁÉÙ2MµÄ¶«Î÷²ÅÄÜÏÂÔØ5MµÄ¶«Î÷.
Èç¹û±ÈÂÊÒªÓ¦ÓÃÓëËùÓÐÓû§(²»ÂÛÄäÃûÓë·ñ),ʹÓÃ"-Q"Ñ¡Ïî,·½·¨Óë"-q"Ïàͬ.
×¢Òâ:
root´ÓÀ´Ã»ÓбÈÂÊÏÞÖÆ.µ±"-Q"Ñ¡ÏîÓë"-a"»ò"-A"Ñ¡ÏîͬʱÔËÓÃʱ,ÊÜÐÅÈεÄ×é³ÉԱҲûÓбÈÂÊÏÞÖÆ.
13.´ø¿íÏÞÖÆ
Pure-FTPdÓÐÒ»¸öÓÐȤµÄÄÚÖù¦ÄÜ:¼òµ¥µÄ´ø¿íÏÞÖÆ.
*ÄãÏ£ÍûÏÞÖÆFTPÁ÷Á¿,ÕâÑùͨ¹ýÕâ¸öÐÒéÉÏ´«¡¢ÏÂÔØÎļþ²»»áÕ¼ÂúÍøÂç´ø¿í¡£
´øÑ¡Ïî--with-throttling±àÒëPure-FTPd
ÔËÐÐʱ¼ÓÉÏ"-T"±êÖ¾,ºóÃæ¸úÒ»¸öÊý×Ö
Õâ¸öÊý×ÖÊǵ¥¸öÓû§ÔÚÒ»¸ö»á»°ÖпÉÒÔʹÓõÄ×î´ó´ø¿í,µ¥Î»ÊÇk/s.
*ÄãÏ£Íû¸øÄäÃûÓû§µÄ´ø¿íСÓÚ¸øÑéÖ¤Óû§µÄ.ÕâÑù,µ±´ø¿í½ôÕÅʱ,ÕæʵÓû§»¹¿ÉÒÔÕý³£µÄÉÏ´«/ÏÂÔØ.
´øÑ¡Ïî--with-throttling±àÒëPure-FTPd
ÔËÐÐʱ¼ÓÉÏ"-t"±êÖ¾,ºóÃæ¸úÒ»¸öÊý×Ö
ÀýÈç:
/usr/local/sbin/pure-ftpd -t 64
ÕâÑù,²»ÂÛÄãµÄÕæʵ´ø¿íÓжà´ó,ÉÏ´«/ÏÂÔØÎļþ¶¼²»»áÕ¼Óó¬¹ý64KB/s.
*ʵ¼ÊÉÏ,¿ÉÒÔ¸øÉÏ´«,ÏÂÔز»Í¬µÄ´ø¿íÏÞÖÆ."-t"ºÍ"-T"ºóÃ涼¿ÉÒÔ¸ú×ÅÁ½¸öÊý×Ö,ÓÃðºÅ(":")¸ô¿ª.Ç°Ò»¸öÊýÊÇÉÏ´«´ø¿íÏÞÖÆ,ÏÂÒ»¸öÊÇÏÂÔØ´ø¿íÏÞÖÆ.ÆäÖÐÒ»¸ö¿ÉÒÔΪ¿Õ,Òâ˼ÊDz»ÏÞËÙ.
Àý1:ÉÏ´«256KB/s,ÏÂÔØ64KB/s
/usr/local/sbin/pure-ftpd -t 256:64
Àý2:ÉÏ´«256KB/s,ÏÂÔز»ÏÞËÙ
/usr/local/sbin/pure-ftpd -t 256:
Àý3:ÉÏ´«²»ÏÞËÙ,ÏÂÔØ64KB/s
/usr/local/sbin/pure-ftpd -t:64
ûÓÐðºÅʱ,¾ÍÈÏΪÉÏ´«ÏÂÔØËÙ¶ÈÏàͬ,¾ùΪͬһ¸öÖµ,ËùÒÔ"-t 64"¿ÉÒÔ¿´×ö"-t 64:64"µÄ±ð³Æ.
*µ±Pure-FTPdÔËÐÐʱ¼ÓÈëÁË´ø¿íÏÞÖÆ,»á°Ñ½ø³ÌµÄÓÅÏȼ¶½µµ½10.ÕâÑù,"-t 10"¾ÍÓÐÒâÒåÁË:µ±CPU½ôÕÅʱ,ÑéÖ¤Óû§»á±ÈÄäÃûÓû§¸úÓÐÔðÈÎ."-T 0"¾ÍºÜûÓÃÁË,²»¹ýËüÒ²Äܹ¤×÷,¶Ô·þÎñÆ÷½ø³Ì»¹ÊÇÓкô¦µÄ.
*Èç¹ûÄãÐèÒª¸ß¼¶µÄ´ø¿í¹ÜÀí,¿´¿´ÄãµÄÄÚºËQ.O.S¹¦ÄÜ.
14.ÐéÄâ·þÎñÆ÷
ʹ ÓÃÐéÄâ·þÎñÆ÷ÊÇÔÚͬһ¸öµçÄÔÉÏ¿ª¼¸¸öFTPÕ¾µãµÄÒ»ÖÖ·½±ãµÄ·½·¨.±ÈÈç,ÄãÓÐÁ½¸ö¿Í»§,Ç°Ò»¸öÓµÓÐ"c9x.org"ÓòÃû,¶øºóÒ»¸öÓµ ÓÐ"ttchat.com"ÓòÃû.Á½¸ö¶¼ÒÔͬһ̨µçÄÔΪÖ÷»ú,²»¹ýËüÃDz»Ïë¹²ÏíÏàͬµÄÎļþ.ftp://ftp.c9x.org/ÏÔʾµÄÎļþÄÚÈÝÒª²»Í¬ÓÚ ftp://ftp.rtchat.com/.FTPÐÒé²»ÔÊÐí»ùÓÚÃû×ÖµÄÑ¡Ôñ.ËùÒÔ,Èç¹ûÄãÏëÔÚͬһ̨Ö÷»úÉÏ,±£³Ö±ê×¼¶Ë¿Ú,ÔËÐÐN¸ö²»Í¬µÄÐéÄâFTP ·þÎñÆ÷,ÄãÐèÒªN¸ö²»Í¬µÄIPµØÖ·.µ±È»£¬Äã¿ÉÒÔʹÓÃHTTP.
¸øÍøÂçÊÊÅäÆ÷·ÖÅäËùÐèµÄIPµØÖ·(ʹÓÃ"ifconfig eth0:x ..."»òÕß"ip addr add dev eth0 a.b.c.d").
ÏÖÔÚ,Èç¹û²»´æÔÚ/etc/pure-ftpd Îļþ¼Ð,¾Í´´½¨Ò»¸ö.
mkdir /etc/pure-ftpd
ÒªÌí¼ÓÐéÄâFTP·þÎñÆ÷,Ö»ÒªÔÚ/etc/pure-ftpd ½¨Á¢Ò»¸öÐéÄâÖ÷»úIPµ½°üº¬ÐéÄâÖ÷»úÎļþµÄÎļþ¼ÐµÄ·ûºÅÁ´½Ó.
ÀýÈç:
ln -s /home/customers/rtchat.com/ftp /etc/pure-ftpd/216.226.17.77
ln -s /home/customers/c9x.org/ftp /etc/pure-ftpd/212.73.209.252
¸ã¶¨ÁË!°ÑC9XµÄÎļþ·Åµ½/home/customers/c9x.org/ftp/,°ÑRTChatµÄÎļþ·Åµ½/home/customers/rtchat.com/ftp/
ÆôÓÃÁËÕâ¸ö¹¦Äܺó,·þÎñÆ÷ÉϵÄÿ¸öÕÊ»§¶¼¿ÉÒÔÓÐ×Ô¼ºµÄ¹«¿ªÄäÃûFTPÇøÓò.Èç¹ûÄãÔÚÌṩÖ÷»ú·þÎñ,Õâ¸ö¹¦ÄܶÔÄãµÄ¿Í»§ºÜºÃ.
*¾¯¸æ*:ÕâÒ²Òâζ×ÅÄãµÄ¿Í»§¿ÉÒÔ½¨Á¢È¨ÏÞΪ1777µÄ"incoming"Îļþ¼Ð.Õâ¿ÉÄÜÊǼþºÃÊÂ,²»¹ýÕâÒ²¿ÉÒÔ°ÑÄãµÄÓ²Å̱»¸÷ÖÖ¶«Î÷ÌîÂú.Äã¿ÉÒÔÓÃ"-i"(»òÕß--anonymouscantupload)Ñ¡ÏîÀ´½ûÖ¹ÄäÃûÓû§ÉÏ´«.
ĬÈÏÇé¿öÏÂ,ʵ¼ÊÓû§»òÄäÃûÓû§¿ÉÒÔ·ÃÎÊ·ÖÅä¸ø·þÎñÆ÷µÄËùÓÐIPµØÖ·.Äã¿ÉÒÔÓÃ-e(½öÏÞÄäÃûÓû§)»òÕß-E(½öÏÞʵ¼ÊÓû§)À´½øÐзÃÎÊÏÞÖÆ.
Ò»ÖÖ¸üÁé»îµÄ·½·¨ÊÇʹÓÃ"-V <ip address>"À´¶¨Òå"ÊÜÐÅÈεÄ"IPµØÖ·.µ±¿Í»§Á¬½Óµ½ÊÜÐÅÈεÄIPʱ,ÄäÃûºÍʵ¼ÊµÄµÇ¼¶¼ÔÊÐí.²»¹ýÔÚÆäËûµÄIPÉÏ,Ö»ÔÊÐíÄäÃûÓû§.
Èç ¹ûÄãÊÇÖ÷»ú·þÎñÌṩÉÌ,¶øÇÒÿ¸ö¿Í»§¶¼ÓÐ×Ô¼ºµÄIPµØÖ·,×îºÃÓÐÒ»¸ö¹©ËùÓеĿͻ§ÔÚÆäÕÊ»§ÄÚ¹ÜÀíÎļþµÄÊÜÐÅIP.¶ÔËùÓеĿͻ§,´ËIP¾ùÊÇÏàͬµÄ.Èç¹ûÄ㠵Ŀͻ§Óо²Ì¬IP,Äã¿ÉÒÔºÜÇáËɵÄÓ÷À»ðǽ¹æÔòÏÞÖƶԸÃIPµÄ·ÃÎÊ.ʹÓÃ"-V <ÊÜÐÅIP>",²¢½«/etc/pure-ftpd/<¿Í»§IP>Á´½Óµ½~customer/ftp.
ÿ¸ö¿Í»§¶¼»áÓÐ×Ô¼ºµÄ*ÄäÃûרÓÃ*FTP·þÎñÆ÷,ÕâÑùºÚ¿ÍÃǾͱØÐëÕÒµ½ÊÜÐÅIP²Å¿ÉÒÔ½øÈë.
15. IPv6 Ö§³Ö
Pure- FTPdÈ«ÃæÖ§³ÖIPv6(native IPv6µØÖ·ºÍ4-in-6µØÖ·).²»¹ýµÃʹÓÃÀí½âIPv6ÐÒéµÄ³¬¼¶·þÎñ,ÏñRlinetd»òXinetd.InetdµÄ½üÆÚ°æ±¾Ó¦¸ÃÒ²¿ÉÒÔ(δ¾È· ÈÏ).IPv6´¦´¦¶¼¿ÉÖ§³Ö:ÈÕÖ¾¼Ç¼,ÅäÖÃÑ¡Ïî,ÐéÄâÖ÷»ú,ÐÒé(EPSV/EPRTÖ§³Ö),ÓòÃû½âÎö...
16.¼Ç¼ÈÕÖ¾
ÈÕÖ¾ÐÅÏ¢¶¼·¢Ë͵½syslogÊØ»¤¾«Áé.¿ÉÒÔÓÃ"-f none"Ñ¡ÏîÀ´½ûÓÃÈÕÖ¾¼Ç¼.
Èç¹ûÒª°ÑËùÓеÄFTPÐÅÏ¢ÖØе¼ÈëÒ»¸öÎļþ,²»·ÁÉèΪ/var/log/ftp,¾ÍÔÚ/etc/syslog.confÎļþÌí¼ÓÈçÏÂÒ»ÐÐ:
ftp.* /var/log/ftp
È»ºóÖØÆôsyslogdÊØ»¤¾«Áé:
killall -HUP syslogd
Ò²¿ÉÒÔ·ÅÆú¾ÉµÄ"syslogd"ºÍ"klogd",תÓÃMetalog,Ò»¸öÓÐЧµÄÌæ´úÈí¼þ:
http://metalog.sourceforge.net
ÉÏ´«/ÏÂÔصÄÎļþÃû¶¼´ø·¾¶¼Ç¼,ÈçÏÂ:
/home/ftp//pub/bla.jpg
˫б¸Ü"//"ÊÇchrootÏÞÖÆ.
17.¼àÊÓµ±Ç°»á»°
×Ô´Ó0.97.7°æ±¾ÒÔºó,¿ÉÒÔËæʱÊäÈë"pure-ftpwho"À´²é¿´µ±Ç°»î¶¯µÄ»á»°.
Èç¹ûÇÃÈë"pure-ftpwho",µÃµ½µÄ»Ø¸´ÊÇ"Command not found",Ó¦¸Ã°Ñ"/usr/local/sbin"Ìí¼Óµ½ÄãµÄPATH»·¾³±äÁ¿ÖÐ.
ĬÈϵÄÊä³ö¿´ÆðÀ´ÊÇÕâÑùµÄ:
+------+---------+-------+------+-------------------------------------------+
| PID | Login |For/Spd| What | File/IP |
+------+---------+-------+------+-------------------------------------------+
| 2239 | jedi | 00:17 | D/L | XFree86-clients-4.0.3.tar.gz |
| '' | '' | 41K/s| 33% | -> nestea.funboard.de |
+------+---------+-------+------+-------------------------------------------+
| 2385 | ftp | 00:02 | IDLE | |
| '' | '' | | | -> gw2.crn.kjop.co.uk |
+------+---------+-------+------+-------------------------------------------+
"D/L"Òâ˼ÊÇ¿Í»§ÕýÔÚÏÂÔØ,"U/L"Òâ˼ÊÇÕýÔÚÉÏ´«.ÉÏ´«/ÏÂÔصÄÎļþÃûÔÚºóÃæµÄÁÐÖÐ."33%"Êǵ±Ç°²Ù×÷µÄʵʱ½ø¶È,"41K/s"ÊÇ¿Í»§Õ¼ÓõĴø¿í.ÓÃÕâ¸öÃüÁîÄã¿ÉÒԲ鴦ËÔÚ´óÁ¿Õ¼Óôø¿í.
"pureftp-who"ÃüÁî½ÓÊÜÏÂÃæµÄÑ¡Ïî:
17.1. '-c':
³Ì Ðò±»web·þÎñÆ÷(CGI½çÃæ)µ÷ÓÃ.Êä³öº¬Óгõʼcontent-type headerµÄÍêÕûµÄHTMLÒ³.µ±·¢ÏÖÃûΪ"GATEWAY_INTERFACE"µÄ»·¾³±äÁ¿Ê±,Õâ¸öÑ¡Ïî×Ô¶¯ÆôÓÃ.Èç¹ûÄã¿ÉÒÔ´ÓÒ»¸öÆôÓÃCGIµÄ web·þÎñÆ÷(Apache, Roxen, Caudium, WN, ...)ÉÏ·ÃÎʳÌÐò,Õ⽫ÊÇĬÈϵÄ.
17.2. '-h':
ÏÔʾÃüÁîÐÐÑ¡ÏîµÄÕªÒª.
17.3. '-n':
²»½âÎöÖ÷»úÃû,Ö»ÏÔʾIPµØÖ·(¸ü¿ì).
17.4. '-s':
ÒÔ Ò»ÖÖÒ×ÓÚ±»shell½Å±¾½âÎöµÄ¸ñʽ(²¢²»¶ÔÓû§ÓѺÃ)Êä³ö.ÿ¸ö¿Í»§Ö»ÓÃÒ»ÐÐ,Ö»ÓÐÊý×ÖÊý¾Ý,ÓÃ"|"¸ô¿ª.¶ÔÈËÀ´Ëµ,Õâ²¢²»ÈÝÒ׶Á¶®.µ«ËüÕâÑùÉè¼ÆµÄ Ä¿µÄ¾ÍÊÇΪÁËÈÝÒ×±»shell½Å±¾½âÎö(cut/sed).ÔÚÓû§Ãû»òÎļþÃûÖеÄ"|"Ò²±»ÒýÓÃ,²»¹ý"|"±ä³ÉÁË"\|".
ÊäÈë"pure-ftpwho -h"À´¼ì²éÕâÖÖ¸ñʽ.
17.5. '-w':
Êä³öÍêÕûµÄHTMLÒ³(Webģʽ).
17.6. '-W':
Êä³ö²»º¬headerºÍfooterµÄHTMLÒ³¡£ÕâÊÇǶÈëµÄģʽ,ºÍÀ´×ÔCGI,SSI»òÕßPHP½Å±¾µÄÄÚÁªµÄµ÷ÓÃÏàÅäºÏ¡£
17.7. '-x':
ΪºóÆÚ´¦ÀíÊä³ö½á¹¹Á¼ºÃµÄXMLÊý¾Ý.ÕâÊÇ×ȷµÄģʽ.ʱ¼äÒÔÃëΪµ¥Î»,Îļþ´óСÒÔbyteΪµ¥Î»(ÔÚÆäËûµÄÊä³öģʽÏÂ,Îļþ´óСÒÔkbyte¼ÆËã,¸üÒ׶Á).
17.8. '-v':
Îı¾Ä£Ê½µÄÈß³¤Êä³ö.¸½¼þµÄÐÅÏ¢°üÀ¨ÏÂÔصÄ/ÉÏ´«µÄÎļþµÄ´óϺ,±¾µØIP»òÖ÷»úÃûºÍÁ´½Ó¶Ë¿Ú.Õâ¶ÔÐéÄâÖ÷»úÓÈÆäÓÐЧ.ÏÂÃæÊÇ"pure-ftpwho -v"µÄÒ»¸öÊä³öÑù±¾:
+------+---------+-------+------+-------------------------------------------+
| PID | Login |For/Spd| What | File/Remote IP/Size(Kb)/Local IP |
+------+---------+-------+------+-------------------------------------------+
| 9086 | j | 00:04 | DL | linux-2.4.4.tar.bz2 |
| '' | '' | 22K/s| 27% | -> localhost |
| '' | '' | | | Total size: 20859 Transfered: 5632 |
| '' | '' | | | <- localhost:21 |
+------+---------+-------+------+-------------------------------------------+
18.ÉÏ´«ÒÔºó
³É¹¦ÉÏ´«ÒÔºó,¿ÉÒÔÒÔÐÂÉÏ´«µÄÎļþµÄÎļþÃûΪ²ÎÊý,µ÷ÓÃÍⲿµÄ³ÌÐò»òÕ߽ű¾.Äã¿ÉÒÔÓÃÕâ¸ö¹¦ÄÜÔÚµ±ÓÐÐÂÎļþÉÏ´«Ê±×Ô¶¯·¢ÐÅ.Ò²¿ÉÒÔ°ÑËü´«µÝ¸øÒ»¸öµ÷½Úϵͳ,ɱ¶¾Èí¼þ,MD5Ç©ÃûÉú³ÉÆ÷,»òÕßËæ±ãʲôÄãÏë¶ÔÎļþ×öµÄÊÂ.
ÒªÖ§³ÖÕâ¸ö,·þÎñÆ÷±àÒëʱ±ØÐëÉèÖÃΪ--with-uploadscript.FTP·þÎñÆ÷ÔËÐÐʱ±ØÐë¼ÓÉÏ"-o"Ñ¡Ïî.×îºó,±ØÐëÔËÐб¾Èí¼þ°üÌṩµÄÔËÐÐÒ»¸ö½Ð×ö"pureuploadscript"µÄµÄÊØ»¤¾«Áé.
*ÖØÒªÌáʾ*:
*±ØÐëÏÈÆô¶¯Pure-FTPd,ºóÆô¶¯pureuploadscript.Èç¹û˳Ðò¸ã·´ÁË,¾Í²»ÄÜÕý³£ÔËÐÐ.*
Ϊ °²È«Æð¼û,·þÎñÆ÷´Ó²»Æô¶¯ÈκÎÍⲿ³ÌÐò.Òò´Ë,²ÅÐèÒªÒ»¸ö·ÖÀëµÄÊØ»¤¾«Áé,ÓÃÀ´¶ÁÈ¡·þÎñÆ÷·Åµ½Ö¸¶¨µÄ¹ÜµÀÀïµÄÐÂÉÏ´«.´¦ÀíÉÏ´«Ê±ÊÇͬ²½µÄ,Á¬ÐøµÄ.ËùÒÔÔÚ ¸ººÉºÜ´óµÄ»òÕß²»ÊÜÐÅÈεķþÎñÆ÷ÉÏ,´ø×ÅÈß³¤»òÕß¼«ºÄCPUµÄ½Å±¾ÔËÐÐpureuploadscript²¢²»ÊǺÃÖ÷Òâ.
ÔËÐÐpureuploadscriptµÄÒ»ÖÖ¸ü¼òµ¥µÄ·½·¨ÊÇ"pure-uploadscript -r <½Å±¾ÎļþÃû>":
/usr/local/sbin/pure-uploadscript -r /bin/antivirus.sh
ÐÂÉÏ´«µÄÎļþµÄ¾ø¶Ô·¾¶×÷ΪµÚÒ»¸ö²ÎÊý´«µÝ¹ýÈ¥.
һЩ»·¾³±äÁ¿Ò²ÓÃÓÐȤµÄÖµÌî³ä.
- UPLOAD_SIZE :ÎļþµÄ´óС,ÒÔbyteΪµ¥Î».
- UPLOAD_PERMS :ȨÏÞ,Ò԰˽øÖÆÖµ±íʾ.
- UPLOAD_UID : ËùÓÐÕâµÄUID.
- UPLOAD_GID : ÎļþËùÊôµÄ×é.
- UPLOAD_USER : ËùÓÐÕßµÄÃû×Ö.
- UPLOAD_GROUP : ÎļþËùÊôµÄ×éµÄÃû×Ö.
- UPLOAD_VUSER : ʹÓÃÕßµÄÈ«Ãû,»òÕßÐéÄâÓû§µÄÃû×Ö(×î¶à127¸ö×Ö·û).
pure-uploadscriptÒ²ÓÐһЩѡÏî:
- "-u <uid>"ºÍ"-g <gid>",ÒÔÁíÒ»¸öÕÊ»§À´ÔËÐÐ"pure-uploadscript".½Å±¾Ò²»áÒÔͬÑùµÄÉí·ÝÔËÐÐ.
-"-B",°ÑÔËÐзŵ½ºǫ́
Òª¿´¸ü¶àµÄ¸½¼ÓÐÅÏ¢,Çë²é¿´ÊÖ²áÒ³("man pure-uploadscript")
19. Ŀ¼Áбí
ÄÚ½¨µÄ"ls"Ö§³Ö³£¹æµÄ"ls"ÃüÁîµÄËùÓеij£¼ûÑ¡Ïî.
ΪÁ˸ü·½±ãµÄʹÓÃFTP,ÏÂÃæµÄ¶«Î÷ÄãÓ¦¸ÃÁ˽âµÄ¸ü¶àһЩ:
- '-l': ÄæÏòÁбí,±¨¸æÈÕÆÚ¡¢ËùÓÐÕß¡¢È¨Ï޺ʹóС¡£
- '-a': ÏÔʾÒԵ㿪ͷµÄÎļþºÍĿ¼
- '-F': ÔÚÎļþ¼ÐµÄÃû³ÆºóÌí¼Ó¡°/¡±
- '-d': ÏÔʾÎļþ¼Ð±¾Éí£¬¶ø²»ÊÇÎļþ¼ÐÖеÄÄÚÈÝ
- '-R': µÝ¹éÁбí
- '-S': °´´óСÅÅÐò
- '-t': °´ÈÕÆÚÅÅÐò
- '-r': °ÑÅÅÐò˳Ðò·´¹ýÀ´
ÒªÊÇÄã²»ÊìϤUnix£¬¾ÍµÇ¼µ½ÄãµÄFTP·þÎñÆ÷£¬ÒÀ´Î³¢ÊÔÏÂÃæµÄÃüÁ
ls
ls ¨CF
ls ¨Cl
ls ¨Cla
ls ¨ClR
ls ¨CSl
ls ¨CSlr
ls ¨Ctl
ls ¨Ctlr
Ö§³Öglobbing¡£Òò´Ë,Èç¹ûÄãÔÚÕÒÒ»¸öÔÚδ֪Îļþ¼ÐÖеÄGNOME RPM °ü,Äã¿ÉÒÔÕâÑùÕÒ:
ls */gnome*.rpm
20.ÐéÄâÅä¶î
ÓÃÐéÄâÅä¶î¿ÉÒÔÏÞÖÆÓû§Îļþ¼ÐÖеÄÎļþµÄ×î´óÊýÄ¿ºÍ×Ü´óС.
Ö®ËùÒÔ˵Åä¶îÏÞÖÆÊÇ"ÐéÄâ"µÄ,ÊÇÒòΪËüÃÇ´¦ÀíÅä¶î²¢²»ÊÇÄں˼¶µÄ,¶øÊÇÓÃFTP·þÎñÆ÷±¾Éí.ÓëÄÚºËÅä¶îÏà±È,ÓÐÏÂÁÐÓŵã:
-ÐéÄâÅä¶îÖ»Õë¶ÔFTP·þÎñÆ÷.ÔÚͬһ¸ö·ÖÇøÉÏ,¿ÉÒÔÓò»Í¬µÄϵͳÅä¶îÀ´´¦ÀíÆäËûÎļþ(eg.mail).
-¼´Ê¹Óû§¹²ÏíÏàͬµÄϵͳUID,Ò²¿ÉÒÔ¶Ôÿ¸öÓû§ÉèÖò»Í¬µÄÐéÄâÅä¶î.
-ÐéÄâÅä¶îÔÚ²»Ö§³ÖϵͳÅä¶îµÄÎļþϵͳÉÏÒ²ÄÜÔËÐÐ.²»¹ýÐéÄâÅä¶î±È½ÏÂý,¶øÇÒ²»ÏñÄÚºËÅä¶îÄÇÑù¿É¿¿.ËùÒÔ²»ÄÜÎÞ±£ÁôµÄÐÅÈÎÐéÄâÅä¶î,ϵͳÅä¶î¿ÉÄÜÊÇÔÊÐíºöÂÔÐéÄâÅä¶îµÄ.»¹ÓÐ,ÎļþϵͳÓû§Îļþ¼Ð±ØÐëÄÜÕýÈ·µÄÖ§³ÖÎļþËø¶¨.
ÔÚ Pure-FTPdÖÐ,ÐéÄâÅä¶îÓɵļ¸¸öλÓÚchrootedÓû§Ö÷Ŀ¼ÖеĽÐ".ftpquota"µÄ¼òµ¥µÄÎļþÌṩµÄ.ÎļþÖÐÖ»°üº¬Á½¸öÊý×Ö:Óû§ÏÖ ÓÐÎļþÊýÁ¿ºÍÎļþ¼Ð(+×ÓÎļþ¼Ð)µÄ×Ü´óС,ÒÔbyteΪµ¥Î».ÓÐÐÂÎļþÉÏ´«Ê±,ÕâЩÊý×Ö±ä´ó;µ±Îļþ±»É¾³ýʱ,Õâ¸öÊý×Ö±äС.ºÜ¼òµ¥!
µ±È»,µ±¶ÔÒ»¸öÓû§ÆôÓÃÁËÐéÄâÅä¶î,´ËÓû§±Ø¶¨:1)chrooted 2)²»ÔÊÐíдÅä¶îÎļþ 3)²»ÔÊÐíËûÓýûÖ¹·ÃÎÊijЩÎļþ¼ÐµÄ·½·¨À´ÆÛƼÆÊýÆ÷.
ÓÃ"-n"Ñ¡Ïî¿ÉÒÔ¸øËùÓеÄÓû§ÆôÓÃÅä¶î.Ñ¡ÏîºóÃæ¸ú×ÅÎļþµÄ×î´óÊýÁ¿ºÍ×î´ó´óС(ÒÔMbΪµ¥Î»).ÿ¸öÓû§¶¼ÓÐÏàͬµÄÅä¶î.
ÀýÍâ:Èç¹ûÆôÓÃÁË"-a"Ñ¡Ïî,ÊÜÐÅ×éµÄ³ÉÔ±²»ÊÜÅä¶îÏÞÖÆ.
Èç¹ûÄãÓÃÁËPureDB»òÕßSQLÊý¾Ý¿â,¾Í¿ÉÒÔ¸øÿ¸öÓû§²»Í¬µÄÅä¶î.¹ØÓÚPureDBÊý¾Ý¿âµÄ¸ü¶àÐÅÏ¢,Çë²Î¿¼"README.Virtual-Users"Îļþ.
ËùÒÔ,Èç¹ûÄãÏ£Íû¸øËùÓеÄÓû§×î¶à1000¸öÎļþ,×î´ó10Mb,ÕâÑùÔËÐзþÎñÆ÷:
/usr/local/sbin/pure-ftpd -n 1000:10
".ftpquota"ÎļþÈç¹û¶ªÊ§ÁË,¾Í»áÒªÇó½¨Á¢.²»¹ýµ±Îļþ½¨Á¢Ê±,·þÎñÆ÷¾Í»á¼ÙÉè¸ÃÕÊ»§Îª¿Õ.Èç¹ûÊÂʵ²¢·ÇÈç´Ë,ÄÇôӦ¸ÃÔËÐÐ"pure-quotacheck"ʵÓóÌÐòÀ´´´½¨³õʼ".ftpquota"Îļþ.
"pure-quotacheck"¹¤¾ß¿ÉÒÔ¼ÆËãÎļþ¼ÐÖеÄÎļþ´óСÒÔ¼°ÊýÁ¿,²¢½¨Á¢Ò»¸ö°üº¬ÕâЩÐÅÏ¢µÄ".ftpquota"Îļþ.
Óï·¨ÈçÏÂ:
pure-quotacheck -u username/uid -d home directory [-g group/gid]
ÀýÈç,Èç¹ûÏëͳ¼ÆËùÓÐÕßΪ"ftpusers"ϵͳÕÊ»§µÄ/home/ftpusers/johnÎļþ¼ÐµÄʹÓÃÇé¿ö,Ö»ÒªÔËÐÐ:
pure-quotacheck -u ftpusers -d /home/ftpusers/john
Ö»ÒªÄãÏë,¿ÉÒÔËæʱÔËÐÐ"pure-quotacheck",¾ÍËã".ftpquota"ÎļþÒѾ´æÔÚҲû¹Øϵ.
ʵ¼ÊÉÏ,¶¨Ê±ÎªÃ¿¸öÓû§ÔËÐÐ"pure-quotacheck"ÊǸöºÜºÃµÄ×ö·¨,ÕâÑù¿ÉÒÔ±£Ö¤´¢´æµÄÅä¶îÐÅÏ¢×ÜÊÇ׼ȷµÄ,¾ÍËã·þÎñÆ÷ÓÐЩ¹ÊÕÏ(·þÎñÆ÷bug,Îļþϵͳ±ÀÀ£,Ç¿ÖÆɱµô·þÎñ,µÈµÈ).
¶ÔÓÚ´«Í³µÄ´ÅÅÌÅä¶î,µ±Ó²ÏÞÖƴﵽʱ,¾ÍÎÞ·¨Ð´ÈëеÄÊý¾Ý.¶ÔÓÚ¿ÉÒÔѸËÙ´´½¨µÄÎļþ(ÔÚ±¾µØÎļþϵͳÉϲÙ×÷),ÕâÌýÉÏÈ¥²»´í.µ«Èç¹ûÎļþ´«ÊäÊÇͨ¹ýÍøÂç½øÐеÄ,ÄǾÍÌ«ÁîÈËɨÐËÁË.
Ðé ÄâÅä¶îµÄ¹¤×÷·½Ê½ºÜ¹Å¹Öµ«ÊÇÈ´ºÜÁé»îµÄ·½Ê½.µ±Óû§¿ªÊ¼ÉÏ´«Ê±£¬ÐÂÉÏ´«µÄÎļþ¿ÉÒÔºÍÓû§µÄ×ÜÅä¶îÒ»Ñù´ó¡£Òâ˼¾ÍÊÇ£¬Èç¹ûËýµÄÅä¶îÊÇ10Mb£¬Ëû¾Í¿ÉÒÔÉÏ´« Ò»¸ö10MbµÄÎļþ£¬¼´Ê¹ÔÚËûµÄÎļþ¼ÐÖÐÒѾÓÐ9MbµÄÆäËûÎļþÁË¡£ÔÚËûÉÏ´«ÎļþµÄʱºò£¬ÔÚÉÏ´«½áÊø֮ǰ£¬»áÒâʶµ½×Ô¼ºµÄÅä¶îÒѾ¿ìÓùâÁË£¬ÕâÑùËû¾Í»áת ÒÆ/ѹËõ/ɾ³ýÆäËûÎļþÀ´½ÚÊ¡¿Õ¼ä¡£Ö»Óе±ÉÏ´«Íê³ÉÒԺ󣬲Żá¶Ô´ÅÅÌÅä¶î½øÐмì²é¡£Èç¹ûÅä¶îÈÔÈ»½ôÕÅ£¬ÐÂÉÏ´«µÄÎļþ¾Í»á±»É¾³ý¡£
21. ÑéÖ¤
Pure-FTPdÖ§³Ö¶àÖÖÑéÖ¤·½·¨.ҪʹÓÃijÖÖ·½·¨,ÄãµÃ°ÑËü±àÒë½øÈ¥(¼ì²é./configureÑ¡Ïî).
-ʹÓÃUnixÑéÖ¤(´«Í³µÄ/etc/passwdÎļþ),ÔËÐзþÎñÆ÷ʱÌí¼ÓÏÂÃæµÄÑ¡Ïî:
-l unix
-ҪʹÓÃPAMÑéÖ¤,Ìí¼Ó:
-l pam
-ҪʹÓÃPureDB(ÐéÄâÓû§),Ìí¼Ó:
-l puredb:/path/to/puredb_database
(¹ØÓÚPureDBË÷ÒýÎļþ,ÏêÇéÇëÔĶÁREADME.Virtual-Users)
-ҪʹÓÃLDAPÎļþ¼Ð,Ìí¼Ó:
-l ldap:/path/to/ldap_config_file
(¹ØÓÚLDAPÎļþ¼Ð,ÏêÇéÇëÔĶÁ README.LDAP)
-ҪʹÓÃMySQLÊý¾Ý¿â,Ìí¼Ó:
-l mysql:/path/to/mysql_config_file
(¹ØÓÚMySQLÊý¾Ý¿â,ÏêÇéÇëÔĶÁREADME.MySQL)
-ҪʹÓÃPostgresÊý¾Ý¿â,Ìí¼Ó:
-l pgsql:/path/to/postgres_config_file
(¹ØÓÚPostgresÊý¾Ý¿â,ÏêÇéÇëÔĶÁREADME.PGSQL)
-ҪʹÓÃÍⲿÑéÖ¤ÊÖ¶Î(ÓÃpure-auth),ʹÓÃ:
-l extauth:/path/to/authd/socket
(¹ØÓÚÍⲿÑéÖ¤,ÏêÇéÇëÔĶÁREADME.Authentication-Modules)
¶àÖÖÑéÖ¤·½·¨¿ÉÒÔÁªËø½øÐÐ.ÀýÈç,Äã¿ÉÒÔÕâÑùÔËÐзþÎñÆ÷:
/usr/local/sbin/pure-ftpd -lldap:/etc/pureftpd-ldap.conf -lpuredb:/etc/pureftpd.pdb ¨Clunix
ÿ ÖÖ·½Ê½¶¼°´Ë³Ðò³¢ÊÔ.ÓÃÉÏÃæµÄÃüÁîÐÐ,Ê×ÏÈ̽²âLDAPÎļþ¼Ð.Èç¹ûÓû§ÃûÔÚÕâ¸öÎļþ¼ÐûÓÐÕÒµ½,¾ÍÔÚPureDBÊý¾Ý¿âÖÐËÑË÷ͬÑùµÄÓû§Ãû.Èç¹û»¹Ã»ÓÐ ÕÒµ½,¾ÍËÑË÷/etc/passwd.Èç¹ûÔÚLDAPÎļþ¼ÐÕÒµ½ÁËÓû§Ãû,µ«¸ø³öµÄÃÜÂëÊÇ´íµÄ,¾ÍÌø¹ý½øÒ»²½µÄÑéÖ¤·½·¨.
Èç¹ûÄãÔÚ-lÑ¡ÏîºóûÓÐÌØÊâÖ¸¶¨,ÔÚ·þÎñÆ÷±àÒëʱ¼ÓÈëÁËPAMÖ§³Öʱ,ĬÈÏΪPAMÑéÖ¤·½Ê½,·ñÔò¾ÍÒÔUnixΪĬÈÏ.
22. Îļþ¼Ð±ðÃû
ÎÄ ¼þ¼Ð±ðÃûΪ"cd"ÃüÁîÌṩ"Ëõд".ÀýÈç,Èç¹ûÄã¸ø"/usr/misc/pictures"¶¨ÒåÁËÒ»¸ö½Ð×ö"pictures"µÄ±ðÃû,µ±Óû§Êä Èë"cd pictures"¶øûÓÐÕæʵµÄ"pictures"Ŀ¼´æÔÚʱ,Ëû¾Í±»»á×Ô¶¯µÄÒýµ¼µ½"/usr/misc/pictures".²»Ïñ·ûºÅÁ´½Ó,"cd pictures"ÔÚÈκÎĿ¼Ï¶¼ÓÐЧ.´ú×Ö·û"~"²»¿ÉÀ©Õ¹.
Óû§¿ÉÒÔÊäÈëÏÂÃæµÄÃüÁîÀ´»ñµÃÓÐЧµÄ±ðÃûÁбí.
SITE ALIAS
ÒªÖ§³ÖÕâ¸ö¹¦ÄÜ,·þÎñÆ÷±àÒëʱ±ØÐëÔÚ./configureʱ¼ÓÉÏ--with-diraliases.
Òª¶¨Òå±ðÃû/Îļþ¼Ð¶Ô,Òª½¨Á¢Ò»¸öÃûΪ/etc/pureftpd-dir-aliasesµÄÎļþ,¸ñʽÈçÏÂ:
±ðÃûºÍĿ¼µÄ½»»¥ÐÐ
(ÕâÔÚĿ¼ºÍ±ðÃû¼äÆôÓÃǶÈëµÄ¿Õ¸ñ,ûÓÐÒýÓùæÔò)
¿ÉÑ¡µÄ¿ÕÐÐ
¿ÉÑ¡µÄÒÔ"#"¿ªÍ·µÄÐÐ,×÷Ϊ½âÊÍ
(²»Òªµ½´¦·Å"#"ºÅ)
ÀýÈç:
pictures
/usr/misc/pictures
sources
/usr/src
# ÕâÊÇOpenBSD¶Ë¿ÚÊ÷
pureftpd-port
/usr/ports/net/pure-ftpd
23.ÓÅÏȼ¶·ÖÀë
µ±ÆôÓÃÓÅÏȼ¶·ÖÀëºó,ÿ¸ö»á»°²úÉúÁ½¸ö½ø³Ì:
Ò» ¸öÒÔ"root"ÔËÐеÄ"ÓÅÏÈ"½ø³Ì,²»¹ýÖ»ÄÜ×öºÜ»ù±¾µÄ¡¢¿ÉÐÅÈεĶ¯×÷£¨°ó¶¨¶Ë¿Ú£¬É¾³ýftpwho¼Ç·Ö°å(remove ftpwho scoreboard)£©£»Ò»¸öÊÇ¡°¿Í»§¡±½ø³Ì¡£ÔÚÑéÖ¤ºÍchroot£¨£©ÒԺ󣬡°¿Í»§¡±½ø³ÌÒ»¶¨»áÈ¡ÏûËùÓÐÌØȨ£¬²¢¾«È·µÄÓ븸½ø³Ìͨ¹ýÒ»¸ö˽ÓÐÐŵÀÁª ϵ¡£
ÓÅÏȼ¶·ÖÀë¼õÈõÁ˸߸ººÉ·þÎñÆ÷µÄ±íÏÖ£¬µ«ÔöÇ¿ÁËÀíÂÛÉϵݲȫÐÔ¡£
һЩ¾ÉµÄ¡¢ÓÐË𻵵IJÙ×÷ϵͳ¿ÉÄÜ»á¶ÔÈ¡ÏûÌØȨµÄ½ø³ÌÔÊÐíptrace£¨£©ÏµÍ³µ÷Óá£
ÔÚÕâЩƽ̨ÉÏ£¬Èç¹û·ÇÊÜÐÅÓû§Ò²¿ÉÓÐshell·ÃÎÊ£¬ÆôÓÃÓÅÏȼ¶·ÖÀë¾Í²»ÊÇʲôºÃÖ÷Ò⡣ʹÓÃsrc/ptracetest³ÌÐòÀ´¼ì²éÄãÊÇ·ñÔÚʹÓÃÕâЩƽ̨¡£ÖÁÉÙÔÚSolaris,ISOS,EkkoBSD,OpenBSD,FreeBSDºÍLinuxÉÏÊÇ°²È«µÄ¡£
24. Ϊ¸ß¸ººÉ½øÐÐÓÅ»¯
Èç¹ûÒªÔڸ߸ººÉµÄ·þÎñÆ÷ÉÏʹÓÃPure-FTPd,ÏÂÃæÊÇһЩ»ñµÃ×î¼Ñ±íÏÖµÄÌáʾ:
-±àÒëÑ¡Ïî¼ÓÉÏ:
env CFLAGS="-O2 -fomit-frame-pointer -fgcse -Os" ./configure --with-minimal --without-inetd --without-pam
make install-strip
-ÒÔStandaloneģʽÔËÐÐ
²»Ê¹Óà -C,²»ÆôÓÃpure-ftpwho»òpure-uploadscript (-o),²»ÆôÓÃper-user limits (-y).
-Ôö¼ÓϵͳµÄ×î´óÃèÊö·ûµÄÊýÄ¿ºÍ±¾µØ¶Ë¿Ú·¶Î§
ÔÚLinuxÄÚºËÉÏ,¿ÉÒÔ³¢ÊÔ:
echo 2000 > /proc/sys/fs/super-max
echo 60000 > /proc/sys/fs/file-max
ulimit -n 60000
echo 30000 65534 > /proc/sys/net/ipv4/ip_local_port_range
-ÔÚ£ºLinuxÄÚºËÉÏ£¬½ûÖ¹syncookies, ecn, timestamps ºÍwindow scaling
echo 0 > /proc/sys/net/ipv4/tcp_syncookies
echo 0 > /proc/sys/net/ipv4/tcp_ecn
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
-ÔÚ×°ÔصÄÎļþϵͳÖÐ,½ûÓ÷ÃÎÊʱ¼ä¸üÐÂ.ÔÚLinuxϵͳÖÐ,Ö»ÒªÔÚ/etc/fstabÎļþÖеÄÿ¸ö¹ÒÔصãºó¼ÓÉÏ"noatime,nodiratime".
-½ûÓÃsyslogÊä³öºÍDNS²éѯ.ÔËÐÐʱʹÓÃ:
/usr/local/sbin/pure-ftpd -f none ¨CH
ÔÚFreeBSD,DJ_Oggy,ÍƼöÏÂÃæµÄÉèÖÃ:
>>>ÒýÓÃ:
½øÈëµ¥Óû§Ä£Ê½(ÔËÐÐshutdown now »òÕßboot-s),ÊäÈë
tunefs -n enable <Îļþϵͳ>
ÎÒÍƼö / /usr /var
ÔÚ /etc/fstab ,ÔÚËùÓеÄÎļþϵͳÖÐÌí¼Ó",noatime"
ÔÚ/boot/loader.conf Ìí¼ÓÏÂÃæµÄ¶«Î÷:
hw.ata.wc="1"
kern.ipc.nmbclusters="60000"
ÔÚ/etc/sysctl.conf Ìí¼ÓÏÂÃæµÄ¶«Î÷:
vfs.vmiodirenable=1
kern.ipc.maxsockbuf=2097152
kern.ipc.somaxconn=8192
kern.ipc.maxsockets=16424
kern.maxfiles=65536
kern.maxfilesperproc=32768
net.inet.tcp.rfc1323=1
net.inet.tcp.delayed_ack=0
net.inet.tcp.sendspace=65535
net.inet.tcp.recvspace=65535
net.inet.udp.recvspace=65535
net.inet.udp.maxdgram=57344
net.local.stream.recvspace=65535
net.local.stream.sendspace=65535
¸øËüÁ½Æ¬°¢Ë¹Æ¥ÁÖ£¬ÖØÆô£¬ÔçÉÏÔÙ½ÐÎÒ£¡£¡£¡£¡
(give it two asprin, a reboot and call me in the morning!!!!!)
<<<ÒýÓýáÊø
25.ÒÑÖªµÄÄÚÈÝ
-ÔÚ·Çlinuxϵͳ,"-c"Ö»ÄÜÔÚstandaloneģʽÏÂÔËÐÐ.
-ÔڵǼÓû§ÃûÖÐÓ¦¸Ã±ÜÃâʹÓÿոñ:·ÖÎöÈÕÖ¾ÎļþµÄÓ¦ÓÃÔÚÕâÀï³£³£»á±»"Òס".
-ÔÚ¿ÉÑ¡¸ñʽÖÐ,δÍê³ÉµÄ´«Êä²»±»¼Ç¼.
-ÔÚSolaris(ÖÁÉÙÊÇSolaris8),´óÎļþ+ÐéÄâchroot½ÓºÏÆðÀ´²»ÄܱàÒë.(´¦´¦¶¼ÒªÓÃstat64½á¹¹Ìå´úÌæstat).
-ÔÚSolarisϵͳ,ÒªÈÃchrootÔÚpure-ftpdÖÐÔËÐÐ,ÔÚеĸùĿ¼ÖÐ,ÐèÒª°üº¬ÏÂÁÐÎļþµÄdevÎļþ¼Ð:
crw-rw-rw- 1 root other 11, 42 Dec 10 15:02 tcp
crw-rw-rw- 1 root other 105, 1 Dec 10 15:02 ticotsord
crw-rw-rw- 1 root other 11, 41 Dec 10 15:03 udp
crw-rw-rw- 1 root other 13, 12 Dec 10 15:03 zero
²»È»µÄ»°,»á³öÏÖÕâÖÖÇé¿ö:
ftp> ls
425 Can't create the data socket: Bad file number.
Èç¹ûËùÓÐÓû§¶¼ÒѾ±»chroot,±ØÐëÔÚÿ¸öÖ÷Ŀ¼½¨Á¢ÏÂÁеÄÎļþ.ÕâÑù×ö:
mkdir dev
mknod dev/tcp c 11 42
chmod 0666 dev/tcp
mknod dev/udp c 11 41
mknod dev/zero c 13 12
mknod dev/ticotsord c 105 1
(Kenneth Stailey±¨¸æ)
- ¾Ü¾ø½ÓÊÜASCIIÐø´«.ASCII´«Êä¼òÖ±¾ÍÊǵØÓü,ÒòΪÕâͬʱÏûºÄ¿Í»§ºÍ·þÎñÆ÷µÄCPUʱ¼ä.¶øÇÒ,ÕâÖÖ´«ÊäÏûºÄµÄ´ø¿í´óÓà¶þ½øÖÆ´«Êä.²»¹ý,ÔÊÐí Windows¿Í»§ÉÏ´«½Å±¾µ½Unix·þÎñÆ÷,²¢È¥µôÄÇЩÌÖÑáµÄ^M¼ÇºÅ.Pure-FTPdÌṩASCII´«Êä,µ«²»ÔÊÐíÐø´«.ÕâÖÖÉè¼ÆÊǹÊÒâµÄ.ÒªÖØ ÆôASCII´«Êä,Îļþ±ØÐëÒ»±ÈÌØÒ»±ÈÌصĶÁÈ¡,·ÖÎö.Õâ¿ÉÄÜÒª³ÖÐøºÜ¾Ã.Ö»Òª·¢ËÍÁ½¸öºÜƽ³£µÄÃüÁî,Ò»¸ö¿Í»§¾ÍÄÜÍêÈ«¸ÉµôÒ»¸ö·þÎñÆ÷(ÏûºÄ´óÁ¿µÄCPU ºÍ´ÅÅÌ×ÊÔ´).ÕâûÓÐʲô½â¾ö°ì·¨.
ÁíÍâÒ»µã¾ÍÊǵ±RFCÃèÊöÐø´«ACSII´«Êäʱ,Ðí¶à¿Í»§¶ËºÍ·þÎñÆ÷ÓÃÁíÍâÒ»ÖÖ·½·¨ÊµÏÖ.ºó¹û¾ÍÊǽøÐÐ ASCIIÐø´«»áµ¼ÖÂÊý¾Ý±ÀÀ£.ÓÐЩÖ÷Á÷µÄ·þÎñÆ÷²»¸ú×ÙRFC,ËùÒÔÓеĿͻ§¶ËΪÁËÖ§³ÖÕâЩFTP·þÎñÆ÷·¸Í¬ÑùµÄ´íÎó.ͬʱ,ÆäËûһЩÏÖ´úµÄ¿Í»§¶ËºÍ·þÎñ Æ÷ÔòÊÔͼȫÃæµÄÅäºÏRFC.ËùÒÔ,Èç¹û¿Í»§¶ËºÍ·þÎñÆ÷ÓÃÏàͬµÄ"·½ÑÔ",´«Êä¿ÉÒÔ½øÐÐ.²»È»µÄ»°,ÄãµÄÎļþ¾ÍÂÒµôÁË.ºÜ¼¬ÊÖ,ÊÇ°É?
Èç¹û¿Í»§ÉÏ´« ½Å±¾µ½ÄãµÄ·þÎñÆ÷,ÈÏΪ¿ÉÒÔ°²È«µÄ°ÑËü´Ó×Ô¼ºµÄÓ²ÅÌÉÏɾ³ýÔõô°ì?Èç¹ûÔ¶³ÌÎļþ»µµôÁË,Ëû¾Í»á±äµÃºÜÉúÆø.Õâ¾ÍÊÇPure-FTPd¾Ü¾øASCIIÐø´«µÄ ÔÒò.ÒªÊÇ¿Í»§¸æËßÄã,Ëû²»ÄÜÉÏ´«/ÏÂÔØÒ»¸ö²¿·Ö´«ÊäµÄASCIIÎļþ,¾Í¸æËßËüɾ³ýÒѾ´«ÊäÁËÒ»²¿·ÖµÄÎļþ,ÖØд«Êä.ÕâÊÇΪÁË°²È«×ÅÏë.
26.ÏÂÔØPure-FTPd
Pure-FTPdÖ÷Ò³ÊÇ:http://www.pureftpd.org
Pure-FTPdÓʼþÁбí: http://www.pureftpd.org/ml
Ò²¿ÉÒÔͨ¹ýCVS»ñµÃ×îеÄsnapshot:
cvs -d:pserver:anonymous@cvs.pureftpd.org:/cvsroot/pureftpd login
(²»ÓÃÊäÈëÈκÎÃÜÂë,Ö±½ÓÇûسµ)
cvs -z3 -d:pserver:anonymous@cvs.pureftpd.org:/cvsroot/pureftpd co pureftpd
cd pureftpd
./autogen.sh
ͬÑù,ÄãÒ²¿ÉÒÔ¿´Ò»¿´°üº¬Ô´´úÂë°üµÄFTP¾µÏñµÄ"snapshots"Ŀ¼,ÆäÖаüº¬ÁË¿ÉÒÔ±àÒëµÄʵÑéÐÔµÄÔ´Âë.
FreeBSD ÒÆÖ²°æ±¾¿ÉÒÔ´ÓÕâÀïµÃµ½:ports/ftp/pure-ftpd/
OpenBSD ÒÆÖ²°æ±¾¿ÉÒÔ´ÓÕâÀïµÃµ½:ports/net/pure-ftpd/
NetBSD ÒÆÖ²°æ±¾¿ÉÒÔ´ÓÕâÀïµÃµ½:pkgsrc/net/pureftpd/
Pure-FTPdµÄOpen Packages(C&W ¶àÖֽṹOpenPKG±ê×¼°ü)¿ÉÒÔ´Ó http://www.openpkg.org/download.html µÃµ½.Ô¤±àÒëµÄSolaris ¶þ½øÖÆ°ü¿ÉÒÔ´ÓÏàͬµÄλÖõõ½.
MacOS X°ü¿ÉÒÔ´ÓFinkµÃµ½:http://fink.sourceforge.net/pdb/package.php/pure-ftpd
Gentoo Linux emerging : emerge pure-ftpd
EkkoBSD»ù´¡°²×°¾Í°üº¬ÁËPure-FTPd.
×îеķ¢²¼ºÍ³£¹æµÄsnapshots¿ÉÒÔ´ÓÏÂÃæµÃµ½:
ftp://ftp.pureftpd.org/pub/pure-ftpd (Ò»¸ö¿ìËÙ¾µÏñµÄÁ´½Ó)
ftp://ftp.fr.pureftpd.org/pub/pure-ftpd (Ö÷Õ¾,Âý)
ftp://ftp2.fr.pureftpd.org/pub/mirrors/ftp.fr.pureftpd.org/pub/pure-ftpd (T-Online,¿ì)
ftp://ftp3.fr.pureftpd.org/pub/pure-ftpd (OAV / Cable&Wireless FR, ¿ì)
ftp://ftp.nl.pureftpd.org/pub/pure-ftpd (WideXS NL, ¿ì)
ftp://ftp.dk.pureftpd.org/mirrors/pure-ftpd (Sunsite DK ¾µÏñ, ¿ì)
ftp://ftp.cn.pureftpd.org/pub/pureftpd/pure-ftpd (Öйú¾µÏñ)
ftp://ftp.es.pureftpd.org/mirror/pureftpd/latest (Î÷°àÑÀ¾µÏñ,¿ì)
µ±È»,»¶ÓеľµÏñ.
º«ÎÄRPM¶þ½øÖÆÎļþ¿ÉÒÔ´Ó http://kldp.org/~eunjea µÃµ½,ÕâµÃ¹é¹¦ÓÚIm Eunjea.
QNXÒÆÖ²°æ±¾¿ÉÒÔ´ÓÒÔÏÂÕ¾µã»ñµÃ:
http://www.me.iitb.ac.in/~mritun
http://mritun.qnx.org.ru
http://www.qnxzone.com/~mritun
Èç¹ûÓÐÎÊÌâ,½¨Òé»ò²¹¶¡,¾¡¹Ü¸øÓʼþÁбíÖеÄÈË·¢ÐÅ.ÐÂÊÖºÍһЩ³õ¼¶µÄÎÊÌâͬÑù»¶Ó.
¸ÐлFrank DENIS "Jedi/Sector One"j@pureftpd.org
*Çë¶ÁCONTACTÎļþ
¸øDebianÓû§µÄ±¸Íü¼
ÓÉÓÚStefan HornburgµÄ¹¤×÷,ÏÖÔÚ,ÔÚÓйٷ½Î¬»¤µÄPure-FTPdµÄDebian unstable°ü,¿ÉÒÔÔÚÄãÆ«ºÃµÄÈí¼þ¿âÕÒµ½.
Ä¿Ç°,¿ÉÒԵõ½µÄ°üÓÐ:
- pure-ftpd
- pure-ftpd-common
- pure-ftpd-ldap
- pure-ftpd-mysql
Ï£Íû´ó¼ÒÓÃapt-getÍæµÄÓä¿ì,²¢±¨¸æbugÀ´¸Ä½øÕâЩÈí¼þ°ü.
ÕâЩ°ü¿ÉÒÔ´ÓÄãϲ»¶µÄPure-FTPd¾µÏñµÄ"debian"Ŀ¼»ñµÃ.
Snapshot¿ÉÒÔ´ÓÏÂÃæµÄÈí¼þÔ´»ñµÃ
(woody) deb http://debian.cobolt.net/ pure-ftpd-test main
(sid) deb http://debian.cobolt.net/ pure-ftpd-sid main
ÍƼöÐÅÏ¢
- linuxÃüÁîѧϰ±Ê¼Ç£¨11£©£ºnlÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨5£©£ºrmÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨4£©£ºmkdirÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨1£©£ºlsÃüÁî
- ½«CentosµÄyumÔ´¸ü»»Îª¹úÄڵİ¢ÀïÔÆÔ´
- ʹÓÃNginxÌí¼Óheader·ÀÖ¹ÍøÒ³±»frame
- linuxϼÓËÙscp´«Êä´óÎļþµÄËÙ¶È
- linuxϵͳÉ϶ÔnginxÈÕÖ¾·Ö¸î´¦Àí
- lnmp/nginxϵͳÕæÕýÓÐЧµÄͼƬ·ÀµÁÁ´ÍêÕûÉèÖÃÏê½â
- Í»ÆÆÊ®Íò²¢·¢µÄNginxµÄÅäÖü°ÓÅ»¯
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- ²éÕÒ²¢É¾³ý.svnĿ¼Îļþ
- redis ÆßÖÖÊý¾ÝÀàÐ͵ÄʹÓó¡¾°
- linux ÏÂÎļþ¸´ÖƵ½windowsÏÂÂÒÂëµÄ½â¾ö°ì·¨
- nginx³öÏÖ502 upstream sent too big he....
- linuxÏÂsudoÅäÖÃÏê½â
- linuxÃüÁîѧϰ±Ê¼Ç£¨15£©£ºtailÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨14£©£ºheadÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨13£©£ºlessÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨12£©£ºmoreÃüÁî
- ¼ÓÃÜËã·¨±È½Ï3DES AES RSA ECC MD5 SHA1µÈ
ÆÀÂÛ