成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

Uuntu下利用Poftpd構(gòu)架Ftp服務(wù)器

運(yùn)維 系統(tǒng)運(yùn)維
Uuntu下利用Poftpd構(gòu)架Ftp服務(wù)器:ProFTPD是一個(gè)Unix平臺(tái)上或是類Unix平臺(tái)上的FTP服務(wù)器程序任何人只要遵守GPL版權(quán)聲明,都可以隨意修改源始碼。本文講述的就是Uuntu下利用Poftpd構(gòu)架Ftp服務(wù)器。

  Uuntu下利用Poftpd構(gòu)架Ftp服務(wù)器:這篇文章針對(duì)那些希望利用ftp協(xié)議和朋友們共享文件的人們,就像windows下的FTPserU,我提供的方式不是唯一的,希望我的方法足夠清晰.這個(gè)FTPserver只允許擁有正確密碼的人使用,所以你要明白只有已知的用戶才能讀取你的FTP服務(wù)。

  1- 使用下面的命令安裝proftpd:

  Code:

  1.   sudo apt-get install proftpd  
  2.  

  2- 在etc/shells 加入如下代碼 (sudo gedit /etc/shells to open the file)(譯注:命令行模式下sudo vi /etc/shells) :

  Code:

  /bin/false

  新建一個(gè) /home/FTP-shared 目錄 :

  Code:

  cd /home

  sudo mkdir FTP-shared

#p#

  創(chuàng)建一個(gè)只能用來(lái)讀取ftp的用戶userftp. 這個(gè)用戶不需要有效的shell(更安全) ,所以選擇 /bin/false shell 給 userftp , /home/FTP-shared 作為主目錄.

  為了是這部分更清楚,我給取此操作的命令行:

  Code:

  1.   sudo useradd userftp -p your_password -d /home/FTP-shared -s /bin/false  
  2.  

  在FTP-shared 目錄下新建一個(gè)download和一個(gè)upload 目錄:

  Code:

  1.   cd /home/FTP-shared/  
  2.  
  3.   sudo mkdir download  
  4.  
  5.   sudo mkdir upload  
  6.  

  現(xiàn)在我們來(lái)給它們?cè)O(shè)置相應(yīng)的權(quán)限:

  Code:

  1.   cd /home  
  2.  
  3.   sudo chmod 755 FTP-shared  
  4.  
  5.   cd FTP-shared  
  6.  
  7.   sudo chmod 755 download  
  8.  
  9.   sudo chmod 777 upload  
  10.  

  3- 好了,現(xiàn)在進(jìn)入proftpd的配置文件:

  Code:

  1.   sudo gedit /etc/proftpd.conf  
  2.  

  當(dāng)然你可以按你的需要編輯你自己的proftpd.conf:

  Code:

  1.   # To really apply changes reload proftpd after modifications.  
  2.  
  3.   AllowOverwrite on  
  4.  
  5.   AuthAliasOnly on  
  6.  
  7.   # Choose here the user alias you want !!!!  
  8.  
  9.   UserAlias sauron userftp  
  10.  
  11.   ServerName "ChezFrodon"  
  12.  
  13.   ServerType standalone  
  14.  
  15.   DeferWelcome on  
  16.  
  17.   MultilineRFC2228 on  
  18.  
  19.   DefaultServer on  
  20.  
  21.   ShowSymlinks off  
  22.  
  23.   TimeoutNoTransfer 600  
  24.  
  25.   TimeoutStalled 100  
  26.  
  27.   TimeoutIdle 2200  
  28.  
  29.   DisplayFirstChdir .message  
  30.  
  31.   ListOptions "-l"  
  32.  
  33.   RequireValidShell off  
  34.  
  35.   TimeoutLogin 20  
  36.  
  37.   RootLogin off  
  38.  
  39.   # It's better for debug to create log files ;-)  
  40.  
  41.   ExtendedLog /var/log/ftp.log  
  42.  
  43.   TransferLog /var/log/xferlog  
  44.  
  45.   SystemLog /var/log/syslog.log  
  46.  
  47.   #DenyFilter \*.*/  
  48.  
  49.   # I don't choose to use /etc/ftpusers file (set inside the users you want to ban, not useful for me)  
  50.  
  51.   UseFtpUsers off  
  52.  
  53.   # Allow to restart a download  
  54.  
  55.   AllowStoreRestart on  
  56.  
  57.   # Port 21 is the standard FTP port, so don't use it for security reasons (choose here the port you want)  
  58.  
  59.   Port 1980  
  60.  
  61.   # To prevent DoS attacks, set the maximum number of child processes  
  62.  
  63.   # to 30. If you need to allow more than 30 concurrent connections  
  64.  
  65.   # at once, simply increase this value. Note that this ONLY works  
  66.  
  67.   # in standalone mode, in inetd mode you should use an inetd server  
  68.  
  69.   # that allows you to limit maximum number of processes per service  
  70.  
  71.   # (such as xinetd)  
  72.  
  73.   MaxInstances 8  
  74.  
  75.   # Set the user and group that the server normally runs at.  
  76.  
  77.   User nobody  
  78.  
  79.   Group nogroup  
  80.  
  81.   # Umask 022 is a good standard umask to prevent new files and dirs  
  82.  
  83.   # (second parm) from being group and world writable.  
  84.  
  85.   Umask 022 022  
  86.  
  87.   PersistentPasswd off  
  88.  
  89.   MaxClients 8  
  90.  
  91.   MaxClientsPerHost 8  
  92.  
  93.   MaxClientsPerUser 8  
  94.  
  95.   MaxHostsPerUser 8  
  96.  
  97.   # Display a message after a successful login  
  98.  
  99.   AccessGrantMsg "welcome !!!"  
  100.  
  101.   # This message is displayed for each access good or not  
  102.  
  103.   ServerIdent on "you're at home"  
  104.  
  105.   # Set /home/FTP-shared directory as home directory  
  106.  
  107.   DefaultRoot /home/FTP-shared  
  108.  
  109.   # Lock all the users in home directory, ***** really important *****  
  110.  
  111.   DefaultRoot ~  
  112.  
  113.   MaxLoginAttempts 5  
  114.  
  115.   #VALID LOGINS  
  116.  
  117.   AllowUser userftp  
  118.  
  119.   DenyALL    
  120.  
  121.   Umask 022 022  
  122.  
  123.   AllowOverwrite off    
  124.  
  125.   DenyAll    
  126.  
  127.   Umask 022 022  
  128.  
  129.   AllowOverwrite off    
  130.  
  131.   DenyAll    
  132.  
  133.    /home/FTP-shared/upload/> 
  134.  
  135.   Umask 022 022  
  136.  
  137.   AllowOverwrite on    
  138.  
  139.   DenyAll    
  140.  
  141.   AllowAll 

  好了,你已經(jīng)完成了proftpd的配置,你的服務(wù)端口是1980,而讀取的參數(shù)如下,用戶:sauron,密碼:你為userftp設(shè)置的那個(gè).

#p#

  4- 啟動(dòng)/停止/重啟動(dòng)你的服務(wù):

  Code:

  sudo /etc/init.d/proftpd start

  sudo /etc/init.d/proftpd stop

  sudo /etc/init.d/proftpd restart

  對(duì)你的proftpd進(jìn)行一下語(yǔ)法檢查:

  Code:

  sudo proftpd -td5

  如果想知道誰(shuí)現(xiàn)在連接到你的服務(wù),用ftptop命令(使用字母"t"來(lái)轉(zhuǎn)換顯示頻率),你也可以使用"ftpwho"命令。到此為止Uuntu下利用Poftpd構(gòu)架Ftp服務(wù)器就結(jié)束了。希望對(duì)大家有所幫助。

【編輯推薦】

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

2011-02-25 15:38:58

2009-12-08 12:23:15

UbuntuFTP服務(wù)器

2011-02-23 10:18:51

CentosProFTPD

2021-09-16 07:52:18

FTP服務(wù)器Linux

2011-03-07 17:04:02

ProftpdFTP

2009-11-16 13:17:20

SRP服務(wù)LinuxFTP服務(wù)器

2011-10-21 07:55:28

2009-02-27 13:22:00

2019-02-26 16:20:52

FTP服務(wù)器

2011-02-25 16:34:01

LinuxProftpdFTP

2017-03-17 14:05:48

LinuxUbuntuFTP服務(wù)器

2010-07-01 12:22:40

ftp命令FTP協(xié)議

2009-11-16 13:11:21

2011-02-25 16:14:09

proftpdftp

2011-02-25 15:50:49

2010-05-18 14:34:41

IIS服務(wù)器

2011-03-07 13:36:16

2010-07-02 10:45:46

FTP服務(wù)器登錄

2010-07-01 17:13:53

2011-02-23 15:32:39

vsftpd
點(diǎn)贊
收藏

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

主站蜘蛛池模板: 欧美日韩成人 | 性高朝久久久久久久3小时 av一区二区三区四区 | 日韩在线一区二区 | 久久久久久国产精品免费免费 | 国产免费av网 | 一级大黄色片 | av手机免费在线观看 | 91视视频在线观看入口直接观看 | 在线观看中文字幕 | 亚洲一区二区精品视频 | 成人毛片网站 | 最新中文字幕在线 | 亚洲人人 | 精品一二三区 | 欧美日韩国产中文 | 久久偷人| 国产精品一区2区 | 成人免费一区二区三区视频网站 | 中文字幕一区二区三区四区五区 | 国产ts人妖一区二区三区 | 国产黄色在线观看 | www.99久久.com | 欧美日韩激情 | 日本三级电影在线看 | 日韩av资源站 | 综合久久久久久久 | 亚洲精品一区中文字幕乱码 | 一区二区三区视频 | 亚洲视频二区 | 二区三区视频 | 伊人久久成人 | 精品免费 | 欧美日韩在线综合 | 最新国产精品精品视频 | 欧美亚洲国产日韩 | 免费观看成人鲁鲁鲁鲁鲁视频 | 久久精品国产久精国产 | 久久a久久 | 国产美女在线免费观看 | 成年人视频在线免费观看 | 男人的天堂中文字幕 |