自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Proftpd的配置

運維 系統(tǒng)運維
Proftpd的配置:ProFTPD目標(biāo)是實現(xiàn)一個安全且易于設(shè)定的FTP Server,Proftpd不僅針對Wu-Ftp改進了許多問題,而且還有許多新的功能。那么該如何配置Proftpd?本文將一一簡述。Proftpd的配置:

  Proftpd配置:ProFTPD設(shè)計目標(biāo)是實現(xiàn)一個安全且易于設(shè)定的FTP Server。

  目前Unix或類Unix平臺上 FTP Server十分有限,最常使用的恐怕就是wu-ftpd了。雖然wu-ftpd有著極佳的效能同時也是一套很好的軟件,然而它卻欠缺了許多Win32平臺上FTP Server的一些特色,同時wu-ftpd過去也有不少的安全漏洞陸續(xù)被發(fā)現(xiàn)。

  ProFTPD的原創(chuàng)者本身就曾經(jīng)花非常多的時間尋找wu-ftpd 的漏洞加以改進并且增加許多功能。然而十分不幸的是,他很快地發(fā)現(xiàn)顯然wu-ftpd需要全部重新的改寫才能補足欠缺的設(shè)定能力以及缺乏的一些功能。

  ProFTPD不是從其它FTP Server的既有原始碼修改而產(chǎn)生的,相反的,它是完全獨立而完整、重新改寫的FTP Server。

  主要特色:

  一個單一的和 Apache 的 httpd.conf 類似的配置文件

  每個目錄下的 .ftpaccess 文件(和 Apache 的. htaccess 類似)

  很容易配置的,多個虛擬 FTP 服務(wù)器以及匿名 FTP 服務(wù)

  可以單獨運行也可以從 inetd/xinetd 啟動

  匿名 FTP 的根目錄不需要特別的目錄結(jié)構(gòu)

  系統(tǒng)的二進制文件和其他系統(tǒng)文件沒有 SITE EXEC 命令

  在單獨運行方式下,以非特權(quán)用戶運行,降低攻擊風(fēng)險

  日志以及 utmp/wtmp 支持

  Shadow 口令支持

  一、軟件下載

  proftpd-1.3.0rc3.tar.gz

  二、解壓縮、編譯安裝

  # 解壓縮

  1.   [root@localhost /]# tar zvxf proftpd-1.3.0rc3.tar.gz  
  2.  
  3.   [root@localhost /]#cd proftpd-1.3.0rc3  
  4.  
  5.   #編譯安裝(安裝到/usr/local/proftpd目錄下,可隨意改變此目錄)  
  6.  
  7.   [root@localhost proftpd-1.3.0rc3]# ./configure --prefix=/usr/local/proftpd  
  8.  
  9.   [root@localhost proftpd-1.3.0rc3]# make  
  10.  
  11.   [root@localhost proftpd-1.3.0rc3]# make install  
  12.  

#p#

  三、建立FTP用戶及相關(guān)權(quán)限(此處可根據(jù)實際需要配置)

  1、建立用戶組及用戶

  1.   [root@localhost /]# groupadd ftpusers # 增加一個ftpusers組  
  2.  
  3.   [root@localhost /]# useradd -d /tools -g ftpusers -s /sbin/nologin softsoul  
  4.  
  5.   # 在ftpusers組增加一個名為softsoul的用戶,目錄設(shè)定為/tools,軟件上傳專用  
  6.  
  7.   [root@localhost /]# useradd -d /var/www/html -g ftpusers -s /sbin/nologin websoul # 在ftpusers組增加一個名為websoul的用戶,目錄設(shè)定為/var/www/html,WEB server專用  
  8.  

  2、建立上傳目錄

  1.   # 如果你已經(jīng)配置好WEB server,/var/www/html目錄已經(jīng)存在,只需如下修改目錄權(quán)限(也可以在GUI界面下操作)  
  2.  
  3.   [root@localhost /]# chgrp -R ftpusers /var/www/html # 把wwwroot的歸屬組改為 ftpusers 組  
  4.  
  5.   [root@localhost /]# chmod -R 775 /var/www/html # 設(shè)置權(quán)限,ftpusers組對該文件夾具有讀寫執(zhí)行的權(quán)限,其他用戶只有讀、執(zhí)行權(quán)限(不可沒有執(zhí)行權(quán)限,否則web瀏覽不了)  
  6.  
  7.   [root@localhost /]# mkdir tools #在根目錄下建立tools目錄,作為軟件目錄  
  8.  
  9.   [root@localhost /]# chgrp -R ftpusers tools # 把tools的歸屬組也改為 ftpusers 組  
  10.  
  11.   [root@localhost /]# chmod -R 775 /tools # 設(shè)置權(quán)限  
  12.  

#p#

  四、FTP server配置

  1.   # 如果是和偶一樣的菜鳥,建議在GUI界面下用gedit打開/usr/local/proftpd/etc/proftpd.conf進行配置,配置之前建議做好備份  
  2.  
  3.   [root@localhost /]# vi /usr/local/proftpd/etc/proftpd.conf  
  4.  
  5.   # 以下是偶的proftpd.conf配置內(nèi)容  
  6.  
  7.   # This is a basic ProFTPD configuration file (rename it to  
  8.  
  9.   # 'proftpd.conf' for actual use. It establishes a single server  
  10.  
  11.   # and a single anonymous login. It assumes that you have a user/group  
  12.  
  13.   # "nobody" and "ftp" for normal operation and anon.  
  14.  
  15.   ServerName "Soul's FTP Server"  
  16.  
  17.   ServerType standalone  
  18.  
  19.   DefaultServer on  
  20.  
  21.   # Port 21 is the standard FTP port.  
  22.  
  23.   Port 21  
  24.  
  25.   # Umask 022 is a good standard umask to prevent new dirs and files  
  26.  
  27.   # from being group and world writable.  
  28.  
  29.   Umask 022  
  30.  
  31.   # To prevent DoS attacks, set the maximum number of child processes  
  32.  
  33.   # to 30. If you need to allow more than 30 concurrent connections  
  34.  
  35.   # at once, simply increase this value. Note that this ONLY works  
  36.  
  37.   # in standalone mode, in inetd mode you should use an inetd server  
  38.  
  39.   # that allows you to limit maximum number of processes per service  
  40.  
  41.   # (such as xinetd).  
  42.  
  43.   MaxInstances 30 # 最多有30個proftpd的PID  
  44.  
  45.   MaxHostsPerUser 1 "Sorry, you may not connect more than one time" # 每個IP只允許一個連接  
  46.  
  47.   MaxClientsPerUser 1 "Only one such user at a time" # 每個帳戶在每個客戶端最多可以同時登陸1次  
  48.  
  49.   MaxClientsPerHost 1 "Sorry, you may not connect more than one time" # 同一個客戶端只能最多1個帳號可以登陸  
  50.  
  51.   # Set the user and group under which the server will run.  
  52.  
  53.   User nobody  
  54.  
  55.   Group nobody  
  56.  
  57.   # To cause every FTP user to be "jailed" (chrooted) into their home  
  58.  
  59.   # directory, uncomment this line.  
  60.  
  61.   DefaultRoot ~ ftpuser # 限制ftpusers組的用戶在自己的目錄下  
  62.  
  63.   # Normally, we want files to be overwriteable.  
  64.  
  65.   AllowOverwrite on # 是否允許覆蓋  
  66.  
  67.   # Bar use of SITE CHMOD by default  
  68.  
  69.   DenyAll  
  70.  
  71.   # 設(shè)置只有ftpusers組的用戶可以ftp登錄  
  72.  
  73.   DenyALL  
  74.  
  75.   AllowGroup ftpuser  
  76.  
  77.   # 設(shè)置帳號websoul擁有/var/www/html目錄的所有權(quán)限  
  78.  
  79.   AllowUser websoul  
  80.  
  81.   # 設(shè)置帳號softsoul擁有/tools目錄的所有權(quán)限  
  82.  
  83.   AllowUser softsoul  
  84.  
  85.   # Limit the maximum number of anonymous logins  
  86.  
  87.   MaxClients 10 # 最多允許10個用戶在線  
  88.  
  89.   # We want 'welcome.msg' displayed at login, and '.message' displayed  
  90.  
  91.   # in each newly chdired directory.  
  92.  
  93.   DisplayLogin welcome.msg # 當(dāng)使用者登錄時,則會顯示 welcome.msg 中的歡迎詞信息  
  94.  
  95.   DisplayFirstChdir .message # 當(dāng)使用者轉(zhuǎn)換目錄,則會顯示 .message 中的信息  
  96.  
  97.   ##(上面的歡迎信息我測試后好象不成功,郁悶中,,,,,)  
  98.  
  99.   ServerIdent off # 屏蔽服務(wù)器版本信息  
  100.  
  101.   MaxLoginAttempts 3 # 最大連接次數(shù)  
  102.  
  103.   WtmpLog on # 是否要把ftp記錄在日志中,如果不想可以設(shè)置成off屏蔽掉log日志。  
  104.  
  105.   TimeoutIdle 600 # 客戶端idel時間設(shè)置,默認(rèn)就是600秒  
  106.  
  107.   AllowRetrieveRestart on # 下載時,允許斷點續(xù)傳(默認(rèn)已有,可不設(shè)置)  
  108.  
  109.   AllowStoreRestart on # 上傳時,允許斷點續(xù)傳  
  110.  
  111.   # 讓proftp支持現(xiàn)在流行的FXP傳輸方式,默認(rèn)是不支持的。  
  112.  
  113.   AllowForeignAddress on  
  114.  
  115.   PassivePorts 49152 65534 # 端口也可自己指定喜歡的  
  116.  
  117.   # 下面是關(guān)于匿名用戶的相關(guān)配置,根據(jù)需要自己設(shè)定,因為我不需要匿名用戶登錄,所以全部屏敝掉了  
  118.  
  119.   # A basic anonymous configuration, no upload directories. If you do not  
  120.  
  121.   # want anonymous users, simply delete this entire section.  
  122.  
  123.   #  
  124.  
  125.   # User ftp  
  126.  
  127.   # Group ftp  
  128.  
  129.   # We want clients to be able to login with "anonymous" as well as "ftp"  
  130.  
  131.   # UserAlias anonymous ftp  
  132.  
  133.   # Limit the maximum number of anonymous logins  
  134.  
  135.   # MaxClients 10  
  136.  
  137.   # We want 'welcome.msg' displayed at login, and '.message' displayed  
  138.  
  139.   # in each newly chdired directory.  
  140.  
  141.   # DisplayLogin welcome.msg  
  142.  
  143.   # DisplayFirstChdir .message  
  144.  
  145.   # Limit WRITE everywhere in the anonymous chroot  
  146.  
  147.   #  
  148.  
  149.   # DenyAll  
  150.  
  151.   #  
  152.  
  153.   #  
  154.  

#p#

  五、開機自動運行proftpd

  1.   # 若需要將proftpd設(shè)置為系統(tǒng)啟動時自動啟動則通過如下命令拷貝啟動文件:  
  2.  
  3.   [root@proftpd-1.3.0rc3]# cp ./contrib/dist/rpm/proftpd.init.d /etc/rc.d/init.d/proftpd  
  4.  
  5.   # 修改該腳本的可執(zhí)行屬性:  
  6.  
  7.   [root@localhost /]# chmod +x /etc/rc.d/init.d/proftpd  
  8.  

  **********以下內(nèi)容,大家可以參考****************************

  然后編輯/etc/rc.d/init.d/functions:

  修改

  1.   export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" 
  2.  

  為

  1.   export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin" 
  2.  

  注:若將在運行./cofigure命令時通過--prefix選項指定將proftpd安裝在/usr/sbin目錄下則不需要修改fuctions文件。

  ***************************************************************************

  ====這段內(nèi)容是根據(jù)自己的實際情況修改的內(nèi)容,與上面一段二者選一,大家試一下吧===

  編輯/etc/rc.d/init.d/proftpd

  修改

  1.   PATH="$PATH:/usr/local/sbin" 
  2.  

  為

  1.   PATH="$PATH:/usr/local/proftpd/sbin" 
  2.  

  ======================================================================================

  1.   # 然后運行命令:  
  2.  
  3.   [root@localhost /]# chkconfig --level 35 proftpd on  
  4.  
  5.   # 則下次系統(tǒng)啟動以后,proftpd將自動啟動。  
  6.  
  7.   # 通過如下命令啟動proftpd:  
  8.  
  9.   [root@ftpd /]# /etc/rc.d/init.d/proftpd start  
  10.  
  11.   這時候可以通過如下命令來測試proftpd是否正常運行:  
  12.  
  13.   [root@homeserver usr]# ftp 192.168.1.20  
  14.  
  15.   Connected to 192.168.1.20.  
  16.  
  17.   220 192.168.1.20 FTP server ready  
  18.  
  19.   500 AUTH not understood  
  20.  
  21.   500 AUTH not understood  
  22.  
  23.   KERBEROS_V4 rejected as an authentication type  
  24.  
  25.   Name (192.168.1.20:phoebus): softsoul  
  26.  
  27.   331 Password required for softsoul.  
  28.  
  29.   Password:  
  30.  
  31.   230 User softsoul logged in.  
  32.  
  33.   Remote system type is UNIX.  
  34.  
  35.   Using binary mode to transfer files.  
  36.  
  37.   ftp> 

【編輯推薦】

責(zé)任編輯:zhaolei 來源: CSDN
相關(guān)推薦

2011-02-22 10:08:46

ProFTPD配置

2011-02-22 14:50:53

ProFTPD

2011-02-23 11:15:21

DebianProFTPd

2011-02-24 13:15:59

2011-02-25 12:30:01

ProFtpd配置

2011-02-25 16:39:34

proftpd配置文件

2011-03-08 17:04:10

ProFTPDUbuntu

2011-02-22 16:24:30

2011-03-07 17:15:52

ProFTPD配置

2011-02-25 14:48:25

ProftpdMySQL

2011-02-23 10:43:17

2011-02-24 14:47:48

ProFTPD

2011-03-03 10:06:13

ProftpdMysqlQuota

2011-03-03 13:16:32

Proftpd配置文件

2011-02-25 13:41:59

Proftpdanonymous

2011-02-22 17:24:32

2011-03-08 16:30:40

Proftpd

2011-03-03 10:49:37

Linux配置Proftpd

2011-02-25 10:10:41

Proftpd

2011-02-22 09:06:57

點贊
收藏

51CTO技術(shù)棧公眾號