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

Ubuntu vsftpd安裝設置文件不是件困難的事

系統 Linux
Ubuntu安裝軟件倒不是件困難的事,輸入:sudo apt-get install Ubuntu vsftpd可能會提示你使用光盤,放進去再按回車就行了。安裝了之后會在/home/下建立一個ftp目錄。這時候你可以試著訪問下ftp://IP地址。應該可以看到一個空白內容的ftp空間。默認設置下匿名用戶可以下載,但不能寫入或是上傳。

Ubuntu vsftpd對于電腦使用的玩家的常用軟件,然后我就學習及深入的研究Ubuntu vsftpd,在這里和大家一起探討Ubuntu vsftpd的使用方法,希望對大家有用。Ubuntu vsftpd 和Proftp 安裝與配置 ZT

1)安裝Ubuntu vsftpd

Ubuntu安裝軟件倒不是件困難的事,輸入:sudo apt-get install Ubuntu vsftpd可能會提示你使用光盤,放進去再按回車就行了。安裝了之后會在/home/下建立一個ftp目錄。這時候你可以試著訪問下ftp://IP地址。應該可以看到一個空白內容的ftp空間。默認設置下匿名用戶可以下載,但不能寫入或是上傳

2)設置 Ubuntu vsftpd.conf文件

現在我們要讓匿名用戶無法訪問,并且得輸入Linux上的用戶密碼后才能訪問到他們自己目錄里的內容。首先找到設置Ubuntu vsftpd的文件,位置在/etc/ vsftpd.conf修改之前***先備份下這個文件:sudo cp /etc/ vsftpd.conf /etc/ vsftpd.conf.old然后可以改動了:

  1. #不讓匿名用戶使用  
  2. #anonymous_enable=YES 
  3. #本地用戶可用  
  4. local_enable=YES   
  5. #可用寫操作  
  6. write_enable=YES 
  7. #不需要顯示某目錄下文件信息  
  8. #dirmessage_enable=YES   
  9. #加點banner提示  
  10. ftpd_banner=Hello~~   
  11. #FTP服務器***承載用戶  
  12. max_clients=100 
  13. #限制每個IP的進程  
  14. max_per_ip=5 
  15. #***傳輸速率(b/s)  
  16. local_max_rate=256000 
  17. #隱藏帳號  
  18. hide_ids=YES  

好了,重啟下ftp 服務器看看效果重啟后還是和原來一樣對嗎?呵呵,這是默認的ftp目錄在做鬼,我們把它刪除,再看看。怎么樣?要你輸入用戶名和密碼了吧。

新的問題

1.輸入用戶名密碼后顯示的位置是在用戶的根目錄下,而我們的WEB內容是在public_html目錄里

2.用戶可以跳到任何其他目錄(非常危險..)要解決這些問題我們還得設置下Ubuntu vsftpd.conf

  1. #啟動chroot列表(Change root)  
  2. chroot_list_enable=YES 
  3. #指定列表位置(我這用的是默認地址)  
  4. chroot_list_file=/etc/Ubuntu vsftpd.chroot_list  
  5. 接下來我們得在Ubuntu vsftpd.chroot_list上寫進去我們要限制哪些用戶,不讓他們“漂移”.. 

現在有用戶linyupark,所以只要sudo nano一下,往里面寫就行了這樣我們已經解決第2個問題了,登陸的用戶只能在它的用戶文件夾里活動,下面我們要更狠一點,讓他只能在public_html里活動依然還是找Ubuntu vsftpd.conf

#這句默認設置里是沒有的,自己加user_config_dir=/etc/自己定義一個設置個別用戶用的文件夾地址根據自己設置的地址,建立一個相應的文件夾,然后往里面建立和用戶名相同的文件,nano一下:#本地用戶的根地址,假設用戶是linyuparklocal_root=/home/linyupark/public_html好咯,重啟下服務器。

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

  1. Code:   
  2. sudo apt-get install proftpd  

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

  1. Code:   
  2. /bin/false  

新建一個 /home/FTP-shared 目錄 :

  1. Code:   
  2. cd /home   
  3. sudo mkdir FTP-shared  

創建一個只能用來讀取ftp的用戶userftp. 這個用戶不需要有效的shell(更安全) ,所以選擇 /bin/false shell 給 userftp , /home/FTP-shared 作為主目錄。 為了是這部分更清楚,我給取此操作的命令行:

  1. Code:   
  2. sudo useradd userftp -p your_password -d /home/FTP-shared -s /bin/false   
  3. 在FTP-shared 目錄下新建一個download和一個upload 目錄:   
  4. Code:   
  5. cd /home/FTP-shared/   
  6. sudo mkdir download   
  7. sudo mkdir upload  

現在我們來給它們設置相應的權限:

  1. Code:   
  2. cd /home   
  3. sudo chmod 755 FTP-shared   
  4. cd FTP-shared   
  5. sudo chmod 755 download   
  6. sudo chmod 777 upload  

3- 好了,現在進入proftpd的配置文件:

Code: sudo gedit /etc/proftpd/proftpd.conf //特別注意路徑,網上以前給的是錯的當然你可以按你的需要編輯你自己的proftpd.conf:

  1. Code:   
  2. # To really apply changes reload proftpd after modifications.   
  3. AllowOverwrite on   
  4. AuthAliasOnly on   
  5. # Choose here the user alias you want !!!!   
  6. UserAlias sauron userftp   
  7. ServerName "ChezFrodon"   
  8. ServerType standalone   
  9. DeferWelcome on   
  10. MultilineRFC2228 on   
  11. DefaultServer on   
  12. ShowSymlinks off   
  13. TimeoutNoTransfer 600   
  14. TimeoutStalled 100   
  15. TimeoutIdle 2200   
  16. DisplayFirstChdir .message   
  17. ListOptions "-l"   
  18. RequireValidShell off   
  19. TimeoutLogin 20   
  20. RootLogin off   
  21. # It''s better for debug to create log files ;-)   
  22. ExtendedLog /var/log/ftp.log   
  23. TransferLog /var/log/xferlog   
  24. SystemLog /var/log/syslog.log   
  25. #DenyFilter \*.*/  
  1. # I don''t choose to use /etc/ftpusers file (set inside the users you want to ban, not useful for me)   
  2. UseFtpUsers off   
  3. # Allow to restart a download   
  4. AllowStoreRestart on   
  5. # Port 21 is the standard FTP port, so don''t use it for security reasons (choose here the port you want)   
  6. Port 1980   
  7. # To prevent DoS attacks, set the maximum number of child processes   
  8. # to 30. If you need to allow more than 30 concurrent connections   
  9. # at once, simply increase this value. Note that this ONLY works   
  10. # in standalone mode, in inetd mode you should use an inetd server   
  11. # that allows you to limit maximum number of processes per service   
  12. # (such as xinetd)   
  13. MaxInstances 8   
  14. # Set the user and group that the server normally runs at.   
  15. User nobody   
  16. Group nogroup   
  17. # Umask 022 is a good standard umask to prevent new files and dirs   
  18. # (second parm) from being group and world writable.   
  19. Umask 022 022   
  20. PersistentPasswd off   
  21. MaxClients 8   
  22. MaxClientsPerHost 8   
  23. MaxClientsPerUser 8   
  24. MaxHostsPerUser 8   
  25. # Display a message after a successful login   
  26. AccessGrantMsg "welcome !!!"   
  27. # This message is displayed for each access good or not   
  28. ServerIdent on "you''re at home"   
  29. # Set /home/FTP-shared directory as home directory   
  30. DefaultRoot /home/FTP-shared   
  31. # Lock all the users in home directory, ***** really important *****   
  32. DefaultRoot ~   
  33. MaxLoginAttempts 5   
  34. #VALID LOGINS   
  35. AllowUser userftp   
  36. DenyALL   
  37. Umask 022 022   
  38. AllowOverwrite off   
  39. DenyAll   
  40. Umask 022 022   
  41. AllowOverwrite off   
  42. DenyAll   
  43. Umask 022 022   
  44. AllowOverwrite on   
  45. DenyAll   
  46. AllowAll  

好了,你已經完成了proftpd的配置,你的服務端口是1980,而讀取的參數如下,用戶:sauron,密碼:你為userftp設置的那個。

4- 啟動/停止/重啟動你的服務:

  1. Code:   
  2. sudo /etc/init.d/proftpd start   
  3. sudo /etc/init.d/proftpd stop   
  4. sudo /etc/init.d/proftpd restart  

對你的proftpd進行一下語法檢查:

  1. Code:   
  2. sudo proftpd -td5  

想知道誰現在連接到你的服務,用ftptop命令(使用字母"t"來轉換顯示頻率),你也可以使用"ftpwho"命令。

【編輯推薦】

  1. Ubuntu IT在Linux中各種操作技術
  2. Ubuntu lighttpd安裝和配置
  3. Ubuntu PHP測試環境中調試和分析代碼
  4. Ubuntu Ruby在Rails應用程序中解決內存泄漏問題
  5. Ubuntu ruby解析器應用程序的優化
責任編輯:佚名 來源: csdn
相關推薦

2011-02-24 12:57:42

Ubuntuvsftpd安裝

2010-01-13 15:53:11

CentOS vsft

2010-07-21 09:28:46

Ubuntu Linu

2010-03-05 16:20:38

Ubuntu中文環境

2010-02-22 15:04:53

Ubuntu 7.04

2013-05-07 09:23:59

Ubuntu 13.0

2011-10-08 18:10:14

Ubuntu 11.1

2011-04-27 09:22:44

Ubuntu 11.0

2020-05-08 11:08:24

Ubuntu 20.0Linux命令

2023-05-08 19:32:56

2011-03-09 14:02:55

LAMP安裝設置

2013-11-08 10:42:31

Ubuntu 13.1

2017-10-22 16:01:25

Ubuntu系統瀏覽器

2013-10-31 13:31:19

Ubuntu 13.1

2011-02-23 10:11:10

ProFTPd安裝

2022-10-28 08:37:03

UbuntuLinux

2011-02-23 14:38:39

安裝CentOS vsftpd

2011-03-02 15:12:11

2011-02-23 14:38:39

安裝CentOS vsftpd

2015-10-26 16:34:08

安裝Ubuntu 15.1Linux
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 91看片网 | 最新中文字幕在线 | 精品久| 欧美成人一区二区三区 | 国产视频黄色 | 一区二区三区国产好的精 | 成人在线免费观看视频 | 9999在线视频 | 成人在线观看免费 | 欧美国产日韩在线观看 | 日本不卡免费新一二三区 | 91xxx在线观看 | 男女羞羞视频在线看 | 久草院线| 91精品久久 | 欧美色视频免费 | 亚洲免费精品一区 | 欧美激情欧美激情在线五月 | 午夜影视| 日日艹夜夜艹 | 国产www.| 特黄视频 | 国产精品一区二区久久 | 日韩有码在线播放 | 狠狠干五月天 | 一区二区三区精品在线视频 | 日韩三级在线 | 欧美阿v | 91精品一区 | 午夜午夜精品一区二区三区文 | 国产亚洲精品精品国产亚洲综合 | 亚洲国产成人精品在线 | 国产精品久久久久久久久久久免费看 | 2020天天操 | 99精品99 | 久久久噜噜噜www成人网 | 国产成人精品一区二区三区在线 | 亚洲欧美在线观看 | 91亚洲精华国产 | 精品亚洲一区二区 | 亚洲人成一区二区三区性色 |