XAMPP中proftpd的簡明配置方法
用LAMPP的安裝方法可以開一個默認的nobody用戶,用lampp security就可以初始設置相應的默認用戶密碼。
如果要有多用戶,又怎樣管理。目錄怎樣設置呢?
具體要求如下:使用Lampp的proftpd,開通多個FTP用戶,並各分配一個目錄,而且需要限制用戶在自己的目錄里面,可以自由讀寫.
操作步驟:
第一步:設置ftp用戶組,輸入命令:
第三步:簡單配置proftpd,輸入命令:
DefaultRoot ~ ftpusers #限定目錄內
#設置所有權限,解決用FTP上傳不能覆蓋
AllowOverwrite on
第四步:重啟proftpd
# Slow logins
# This is probably caused by a firewall or DNS timeout. By default ProFTPD will try to do both DNS and ident lookups against the
# incoming connection. If these are blocked or excessively delayed a slower than normal login will result. To turn off DNS and ident
# use:
UseReverseDNS off
IdentLookups off
如果要有多用戶,又怎樣管理。目錄怎樣設置呢?
具體要求如下:使用Lampp的proftpd,開通多個FTP用戶,並各分配一個目錄,而且需要限制用戶在自己的目錄里面,可以自由讀寫.
操作步驟:
第一步:設置ftp用戶組,輸入命令:
$ groupadd ftpusers #創建用戶級ftpusers
第二步:創建用戶目錄\用戶\密碼,輸入命令: $ mkdir /www/ #創建目錄www
$ chmod -R 777 /www/ #設置權限,好像必須777
$ useradd -d /www/ -g ftpusers -s /sbin/nologin ftp1 #增加用戶ftp1
$ passwd ftp1 #修改用戶名ftp1的密碼
第三步:簡單配置proftpd,輸入命令:
vi /opt/lampp/etc/proftpd.conf #打開proftpd配置文件proftpd.conf
修改內容:DefaultRoot ~ ftpusers #限定目錄內
#設置所有權限,解決用FTP上傳不能覆蓋
AllowOverwrite on
第四步:重啟proftpd
/opt/lampp/lampp reloadftp #重啟proftpd
附:如果連接FTP時速度慢,請在proftpd配置文件proftpd.conf 中加入以下內容:# Slow logins
# This is probably caused by a firewall or DNS timeout. By default ProFTPD will try to do both DNS and ident lookups against the
# incoming connection. If these are blocked or excessively delayed a slower than normal login will result. To turn off DNS and ident
# use:
UseReverseDNS off
IdentLookups off