偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

linux 下配置vsftpd

運(yùn)維 系統(tǒng)運(yùn)維
Linux下配置vsftpd。vsftpd 是在Linux發(fā)行版中最受推崇的一種FTP服務(wù)器程序,vsftpd的特點(diǎn)是小巧輕快、安全易用。 Linux也是為人們所常用的操作系統(tǒng)之一。本文主要講解的是如何在Linux下vsftp服務(wù)器配置。

  1.生成虛擬用戶(hù)口令庫(kù)文件

  為了建立此口令庫(kù)文件,先要生成一個(gè)文本文件。該文件的格式如下,單行為用戶(hù)名,偶行為口令:

  1.   #vi logins.txt  
  2.  
  3.   zhangsan  
  4.  
  5.   123456  
  6.  

  2.生成口令庫(kù)文件,并修改其權(quán)限:

  1.   #db_load -T -t hash -f /etc/vsftpd/logins.txt /etc/vsftpd/vsftpd_login.db  
  2.  
  3.   #chmod 600 /etc/vsftpd/vsftpd_login.db  
  4.  

  3.新建一個(gè)虛擬用戶(hù)的PAM文件。加上如下兩行內(nèi)容:

  1.   #vi /etc/pam.d/vsftp.vu  
  2.  
  3.   auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login  
  4.  
  5.   account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login  
  6.  

  4.建立虛擬用戶(hù)

  設(shè)置該用戶(hù)所要訪(fǎng)問(wèn)的目錄,并設(shè)置虛擬用戶(hù)訪(fǎng)問(wèn)的權(quán)限:

  5

  1. .#mkdir /home/ftpsite  
  2.  
  3.   #useradd -d /home/ftpsite -s /sbin/nologin jack(創(chuàng)建用戶(hù)jack,注意vsftpd.conf里的guest_username必須和這里對(duì)應(yīng))  
  4.  
  5.   #chmod 700 /home/ftpsite  
  6.  

  經(jīng)過(guò)該步驟的設(shè)置,/home/ftpsite就是jack用戶(hù)的主目錄,該用戶(hù)也是ftpsite目錄的擁有者。除root用戶(hù)外,只有該用戶(hù)具可對(duì)該目錄的讀、寫(xiě)和執(zhí)行。

  6.用戶(hù)配置文件目錄

  然后在用戶(hù)配置文件目錄下創(chuàng)建相應(yīng)的用戶(hù)配置文件,比如為上述名為zhangsan的用戶(hù)創(chuàng)建一個(gè)配置文件(假設(shè)配置文件目錄為/etc/vsftpd_user_conf):

  1.   #vi /etc/vsftpd_user_conf/zhangsan  
  2.  
  3.   local_root=/home/ftpsite/zhangsan(用戶(hù)登陸后直接進(jìn)入自己目錄不能瀏覽別家目錄)  
  4.  
  5.   anon_world_readable_only=NO 
  6.  
  7.   write_enable=YES 
  8.  
  9.   anon_upload_enable=YES 
  10.  
  11.   anon_mkdir_write_enable=YES 
  12.  
  13.   anon_other_write_enable=YES 
  14.  

  7,虛擬用戶(hù)個(gè)人目錄設(shè)置

  大家可以發(fā)現(xiàn),無(wú)論是哪個(gè)虛擬用戶(hù),登錄后所在的目錄都是/home/ftpsite,即都是guest用戶(hù)的自家目錄。下面,介紹如何為每個(gè)虛擬用戶(hù)建立自家目錄。

  一種作法是在虛擬用戶(hù)的個(gè)人配置文件中使用local_root選項(xiàng)指定虛擬用戶(hù)的自家目錄。

  以zhangsan為例,在第上步的基礎(chǔ)上,首先/etc/vsftpd_user_conf/zhangsan文件中加入:

  1.   local_root=/home/ftpsite/zhangsan  
  2.  

  8. 重新啟動(dòng)VSFTP:

  1.   #service vsftpd restart  
  2.  

【編輯推薦】

  1. Linux下vsftp服務(wù)器配置
  2. Linux下配置vsftpd
  3. vsFTPD設(shè)置(菜鳥(niǎo)篇)
  4. vsftpd安裝篇
  5. vsftpd 啟動(dòng)篇
  6. Linux下vsftpd的配置
  7. 如果SELinux拒絕vsftpd上傳文件到用戶(hù)主目錄怎么辦
  8. vsFTPd常用功能之限速和限制鏈接點(diǎn)

 

責(zé)任編輯:zhaolei 來(lái)源: 網(wǎng)絡(luò)轉(zhuǎn)載
相關(guān)推薦

2011-02-23 15:50:04

Linuxvsftpd

2011-02-23 15:50:04

Linuxvsftpd

2011-02-22 13:28:43

Linuxvsftpd配置

2011-03-01 09:44:04

ubuntuvsftpd

2011-02-24 10:18:41

CentOS配置vsftpd

2011-03-02 13:23:42

Vsftpd配置

2011-02-23 16:25:51

linuxvsftpd

2010-12-27 13:26:25

FreeBSDvsftpd虛擬用戶(hù)

2015-08-25 14:34:20

LinuxvsftpdFTP

2011-03-03 15:21:11

2011-03-02 11:32:55

vsftpd配置

2011-02-23 09:55:33

Centos安裝vsftpd

2010-01-11 14:46:41

vsftpd配置

2011-03-02 10:19:44

2011-03-04 16:34:03

vsFTPd

2011-03-04 09:32:30

Vsftpd目錄

2011-01-13 15:57:20

FreeBSD 8.1vsftpd

2011-03-02 09:52:03

2011-02-23 16:08:24

LinuxvsftpdFTP

2011-02-23 16:09:48

點(diǎn)贊
收藏

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