:
, N: L9 C8 Y/ `" R8 B/ whttp://www.111cn.net/sys/CentOS/88456.htm- f: r; O* K0 G2 l4 C# k1 \
https://www.centos.bz/2011/03/centos-pureftpd-install/
: _2 r! r1 q9 m( b/ r3 E+ k! [, Q9 s5 V2 Z* i8 r
餈Yum摰鋆Pure-ftpd霂衣甇仿炊憒銝嚗& [0 k9 P3 E* U
8 v }* M# m* B
甇仿炊銝:蝵座um皞隞乩舫撠 CentOS 6.X
* q0 G+ M9 M$ M憭隞(憒蝵桀嗡epel皞)
5 k& {6 Y/ _* Y% b& j) U5 ]mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
6 m) S* ]: u9 |銝頧賣郢epo /etc/yum.repos.d/
- K& L9 l8 V6 k; kwget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
; N* f* k3 Q$ i+ Z+ Zyum makecache
- l. q/ Z: U S4 l! p! E# @+ D
1 T$ s, ~8 {* R& Q( m) a隞乩舫撠 CentOS 5.X7 G" {$ I0 M& H6 k$ e0 K' d& `
cd /etc/yum.repos.d/
, Q8 r; p$ \/ E t+ cwget http://centos.karan.org/kbsingh-CentOS-Extras.repo
- d' Z0 i# R; u! Z2 y2 w$ g
/ i( H1 p6 c# [; ^# g+ a敹瞈瘣蝕bs-CentOS-Testing摨怒kbsingh-CentOS-Extras.repo隞塚enabled=0寞enabled=1
( u9 F8 v; G' M7 S- T: r" Bvi kbsingh-CentOS-Extras.repo
5 S$ F" h) q8 U5 K5 U- [kbs-CentOS-Testing]
- name=CentOS.Karan.Org-EL$releasever - Testing
- gpgcheck=1
- gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
- enabled=1
- baseurl=http://centos.karan.org/el$releasever/extras/testing/$basearch/RPMS/
銴鋆賭誨蝣 亦撠乎PG key啗隞嗅澈- rpm --import http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
銴鋆賭誨蝣 憒甇仿銝憭望閰,雿輻其誑銝隞:
- J% V4 @. `0 T' ~8 p! Q! }* }rpm -Uvh ftp://ftp.trychlos.org/pub/CentOS/6.3/pcalfs/x86_64/RPMS/epel-release-6-7.noarch.rpm (CentOS 6.7)
+ M2 j _( R- B1 l* T; y銝臭誑CentOS 6.7,憒浚entOS 6.8 狂oogle 撠 epel-release-6-8.noarch.rpm頛暺,隞交迨憿
, P. e R3 ?/ |5 s, S% r. W+ s* t5 z% U6 _2 T9 z
甇仿炊鈭:yum摰鋆# d2 {, `8 f% f' D" D7 `1 M. f
yum install pure-ftpd -y' r. _2 ?. H7 b
5 ^1 T+ P7 o% Y) D
甇仿炊銝:靽格寥蝵格隞" y) [3 f' l3 l. k2 B, g5 C2 c
vim /etc/pure-ftpd/pure-ftpd.conf
# i& X( h2 I& O0 n' |! h2 E' A! r3 G) M, @6 e
PureDB /etc/pure-ftpd/pureftpd.pdb6 v3 G, b4 O; o% e6 X. s& q
#餅餈銵瘜券嚗摰頝臬嚗PureDB冽唳桀隞& _* } i: K# L$ S
VerboseLog yes
# |1 [- Q ~6 u4 D% S#撘舀亙 /var/log/pureftpd.log
" _4 ~$ [" v! ^0 ~4 b7 MNoAnonymous yes7 n. R/ w3 b+ s! _, q( |
#蝏踹冽瑞餃% T# |0 l, r6 x
PassivePortRange 48000 50000
& g7 ~8 H/ u' R3 j#雿輻刻◤冽芋撘嚗嗥垢
7 x+ Z2 s) \( y, D3 ?2 J5 ?, V' j9 U U1 ]5 s5 }
* }3 o2 N) i3 A7 C- W" \3 n4 D
- y m a/ S' q9 G! G9 g! B
甇仿炊:蝵桅脩怠蝑: ?) d+ _. j( m, Y* v7 e
iptables -A INPUT -p tcp --dport 21 -j ACCEPT) r2 D: n/ m, w* c+ x
iptables -A INPUT -p tcp --dport 48000:50000 -j ACCEPT7 F) Q8 X( L% g. e
8 F1 W! d8 O8 m5 I% L甇仿炊鈭:臬私ure-ftpd+ t. F* c3 {# Z2 H& H6 n
chkconfig pure-ftpd --level 345 on (閮剖瘥甈⊿璈芸瑁)
% ^4 M/ s7 M0 {4 f: C0 L憒曆軏hkconfig,which chkconfig 臭誑曉啣桅雿蝵,銝祆閰脣/sbin,憒/sbin銋瘝銵函內瘝摰鋆chkconfig2 w8 d: r$ E6 ^& q9 W- [# a3 }
yum install chkconfig 摰鋆chkconfig9 m9 `) h3 M8 j: ]% x" B5 X
憒摰鋆摰銋 chkconfig: command not found: X& ^1 {; {9 q: m& x
銝蝯 7 ?+ A3 v# k8 m% x
ln -s /sbin/chkconfig /usr/bin/$ R+ P2 y% Z. Q8 c1 J
$ M" @# O& d5 A+ `' s. j
/etc/init.d/pure-ftpd start service pure-ftpd start雿輻冽蝣澆鋆隢 http://www.111cn.net/sys/CentOS/88456.htm憒 service pure-ftpd start 銋憿舐內 service: command not found: A$ j# N' G( p+ F
銋雿銝蝯
# d: |7 A8 k$ h! @' }ln -s /sbin/service /usr/bin/
2 H7 U" B, T( r2 r) A5 M1 _
& `* r& z8 F- T& f3 S摰鋆 ftp client :
% ~4 S! f1 q) ]9 C7 Kyum install ftp -y2 Y0 O- E" H& `% j1 Y& Y
' |7 {" k* H5 \# O+ u D# d6 b9 {
閮:
1 ^) s) L1 F' C$ ^/ E0 V E6 H' F5 c0 h9 j( a$ Z
1.
: o( F6 F* n( ?when login ftp show error:/ ~, q. D. m# A5 C! c
530 Login authentication failed
$ i: v8 J$ b( Y) x7 ]Login failed.+ T3 U8 ~ J! R, `2 \& H3 v
r a0 z+ m* d; f& Z2 h' a+ h! y; @) Y
/ e3 D3 a; g$ U$ qcheck /var/log/secure
2 O. v: |) X" a s1 m2 dNov 3 10:03:44 DLTB-2475 pure-ftpd: pam_listfile(pure-ftpd:auth): Couldn't open /etc/ftpusers1 r7 r) u1 {5 }& n
Nov 3 10:03:44 DLTB-2475 pure-ftpd: PAM audit_log_acct_message() failed: Operation not permitted/ X$ x, C8 c; f' p# j5 W9 `
6 s5 m5 o+ N2 O9 w9 {* p8 c% f8 T, s
Sol: ]" f4 v) f0 k5 V
vi /etc/pure-ftpd/pure-ftpd.conf
; Q3 X5 [- a% W# u g m# M, U# e8 _; G撠PAMAuthentication 隤霅寞 UnixAuthentication隤霅 ,
! n+ D% Z G6 w* S0 q#PAMAuthentication yes 閮餉圾% Z X6 m3 D( N
UnixAuthentication yes 瘨閮餉圾
3 d1 B7 i& s# C& Rservice pure-ftpd restart
# {$ f2 ^' [! M6 t* B
* M# q$ j$ X1 R! v) |; ~( \2.
7 v1 O8 F, r! i9 ?When login ftp server from remote host show errors:
$ Z- s4 B0 I2 V1 L y' l+ s' z: vconnect: No route to host; G( }/ T' d% N" B2 K& H
舫脩怎雿鈭,iptable瘝⊥閮胤AT,SOL:
. ]/ f% u) M* P; jstop iptables or 拍嗉身摰 iptables D; @! o& P# Y; v
5 |% M: ]1 @; T( s* {
vi /etc/sysconfig/iptables-config4 e6 L8 u( m$ F) \# l- a) Q5 p- S
湔 IPTABLES_MODULES= IPTABLES_MODULES=ip_nat_ftp ip_conntrack_ftp
" q! K+ ?% i/ r) Nservice iptables reload
8 B5 d5 a0 _ J( t+ M* u. W; n* p4 V/ V" v3 Q t( w
3.; p$ o/ x, F" q5 r0 V! s% D4 ]7 C
421 Unable to read the indexed puredb file (or old format detected) - Try pure-pw mkdb
# Z4 j3 l% X2 v _Login failed./ `2 f$ @' e5 ~# K; W0 i3 y) Y0 d' ^. [
9 y( _# j0 ~, M) W! t0 E; XSOL:& W9 k9 y, x2 N" Y1 o1 o% T
vi /etc/pure-ftpd/pure-ftpd.conf. B! B+ A7 a, @, U3 h" W# t
撠 PureDB /etc/pure-ftpd/pureftpd.pdb 閮餉圾
: S1 o: \: j/ \6 L/ }1 ~7 ^4.
! G& t# r6 s7 x9 ~ftp> put file
; H+ C; [, ?9 M3 t' `local: file remote: file
4 e" _% u4 Z( r- w227 Entering Passive Mode (122,117,11,31,193,78)
8 v9 }6 E9 t" L @& h! [553 Can't open that file: Permission denied K# I- P& @8 I! f( P) I! T+ t( |
$ f' G, p0 }' c" uSOL:: K# }" ]1 R# Y8 v) A
ls -l /home/user1$ T" e% p) v* t% _0 N, n) n
drwxr-xr-x. 2 root root 4096 2016-01-17 04:46 user1
+ _9 {( @" }" ochown user1:user1 /home/user1
4 J) S: x# _/ q+ n F: D/ ~
o( m6 j+ @, \1 l[ftp 隞也
, U. Q% T+ Y( Q" N9 H! `7 Rlcd 寡local桅. n W5 F+ } B9 i* i6 F
lls 亦local桅瑼獢 (蝑 !ls)2 U& q& d6 k5 [9 u3 q U1 I
2 J. L1 ^: k2 A; o
) M. [ W- a4 J: K, } A1 }, V9 f
& R& t% J5 h0 o L$ k& O* ?
|
|