:7 L( ^& n; y* f0 I: \& {& Z- y
http://www.111cn.net/sys/CentOS/88456.htm; E+ f$ i6 g, n2 c; p
https://www.centos.bz/2011/03/centos-pureftpd-install/
/ a/ l) H7 v2 J" j) f/ B, g3 b; N* e, B! x- q) e
餈Yum摰鋆Pure-ftpd霂衣甇仿炊憒銝嚗
6 \, e7 a/ R# V" ]1 c( Z3 M3 ]
/ v# x3 h/ K- g* p n4 t5 M甇仿炊銝:蝵座um皞隞乩舫撠 CentOS 6.X
4 \) ~: z. w% X+ o6 X/ d憭隞(憒蝵桀嗡epel皞)
& L4 l) {. `( J3 \$ t+ umv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
2 i/ d, z& H* R3 a% ]銝頧賣郢epo /etc/yum.repos.d/% W3 T; ^2 G0 b/ a. T1 L S6 O3 e% l
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo6 G/ o8 U9 W" }4 k8 I% H
yum makecache
* D% B% Z3 p& [7 F, q* @' x* y3 F2 {) ~1 h3 H7 f
隞乩舫撠 CentOS 5.X5 W5 H. ~: L" Y% R2 J/ P
cd /etc/yum.repos.d/
/ E- Z+ f, h/ |! G$ cwget http://centos.karan.org/kbsingh-CentOS-Extras.repo
% |/ i2 I5 R; X0 m8 g0 s2 @: X( Z( l8 `4 Z; W
敹瞈瘣蝕bs-CentOS-Testing摨怒kbsingh-CentOS-Extras.repo隞塚enabled=0寞enabled=1, ]$ F3 h5 Y( B% V$ \* k2 q+ ~: I
vi kbsingh-CentOS-Extras.repo! r y, v' C5 `% H! |
- [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
銴鋆賭誨蝣 憒甇仿銝憭望閰,雿輻其誑銝隞:
( K( t( J6 [- |9 t5 X* L0 hrpm -Uvh ftp://ftp.trychlos.org/pub/CentOS/6.3/pcalfs/x86_64/RPMS/epel-release-6-7.noarch.rpm (CentOS 6.7)
& A: P& p9 H x) {) |- C# A4 } Q銝臭誑CentOS 6.7,憒浚entOS 6.8 狂oogle 撠 epel-release-6-8.noarch.rpm頛暺,隞交迨憿! H" A" h' c. d
8 s! P7 G2 Q, O1 o甇仿炊鈭:yum摰鋆
- g/ n2 c6 T+ H5 p6 Y- `5 v- o4 Oyum install pure-ftpd -y
' b$ z- J9 O! u1 |4 s* X- r/ f L1 j$ o; R" U) z4 i
甇仿炊銝:靽格寥蝵格隞
( v' c- F- A3 h" e' vvim /etc/pure-ftpd/pure-ftpd.conf
+ _$ X y' b# o* ?
! c/ M' {% g" b0 ?# _* U$ }$ X$ mPureDB /etc/pure-ftpd/pureftpd.pdb+ F0 m* s# [2 G% r3 p w
#餅餈銵瘜券嚗摰頝臬嚗PureDB冽唳桀隞
9 d+ W, L0 B$ r7 XVerboseLog yes: ?4 L9 J3 E9 f; s$ K$ o
#撘舀亙 /var/log/pureftpd.log
4 f! |& t8 K2 _" O8 sNoAnonymous yes" E& ?1 m1 e2 u+ }, j6 r4 f
#蝏踹冽瑞餃* g9 f7 Q. s2 x. J' I
PassivePortRange 48000 50000
( @# `7 s* f1 N8 x e#雿輻刻◤冽芋撘嚗嗥垢
" c# H- E |, i, P) @; [( _; q5 _ x2 a6 l( E, @( i
6 N% R+ I, `1 L* A9 ^4 C' _# s2 T- E# S
甇仿炊:蝵桅脩怠蝑
6 e- O& H, b5 g+ h. L( ]% hiptables -A INPUT -p tcp --dport 21 -j ACCEPT
& }, A* _/ D( w) l+ b7 Tiptables -A INPUT -p tcp --dport 48000:50000 -j ACCEPT
, Y& `( C0 _: x/ w$ X8 P. ~: I2 H8 W. S% l. a4 M- I+ s
甇仿炊鈭:臬私ure-ftpd
" h( U/ h, v# Ichkconfig pure-ftpd --level 345 on (閮剖瘥甈⊿璈芸瑁)
% P3 k9 C+ m5 r. u$ o3 h) p. L2 N憒曆軏hkconfig,which chkconfig 臭誑曉啣桅雿蝵,銝祆閰脣/sbin,憒/sbin銋瘝銵函內瘝摰鋆chkconfig( j$ e D- @- i& |
yum install chkconfig 摰鋆chkconfig) W6 Q6 n, b. P! S6 y
憒摰鋆摰銋 chkconfig: command not found& R9 `2 R% A3 ^
銝蝯 9 f3 D% C6 x) a/ O7 ?& ~8 O
ln -s /sbin/chkconfig /usr/bin// j) ~/ P: q5 s7 x8 @1 r! x
3 S/ d4 B% d Q. z% G
/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, c) [* b1 ^* e1 ]# Y
銋雿銝蝯) f9 s- ^( J% S/ }) l: ?, E1 \3 k
ln -s /sbin/service /usr/bin/
; Y! O3 q/ u( E/ w! T: \/ H' \9 C
/ E8 ]- ]! Y: q, X0 g! k摰鋆 ftp client :
" v$ H9 n/ g2 u% m( y) Nyum install ftp -y1 k* D% @( d& U: l; h8 A' W1 p1 S: r
! S3 a; B2 \. K' A: l+ m0 h. F) w閮:7 d, m1 f" A9 G
# @' P7 N, B1 \. B: u2 G! q
1.
, C" ~& w& t- |# Owhen login ftp show error:
. |1 x! L% l8 z$ m530 Login authentication failed
) H% b1 ?. b; V' }% \Login failed.; l' D* [4 O: A) r' @5 J! Y
2 z& O2 Z; H; M$ z, r# G4 \3 g( v
0 X' R4 @# F+ Y7 X- o) Ocheck /var/log/secure% R7 F: x/ d. [
Nov 3 10:03:44 DLTB-2475 pure-ftpd: pam_listfile(pure-ftpd:auth): Couldn't open /etc/ftpusers( m) T, K$ x' G: h2 R$ S/ V. G
Nov 3 10:03:44 DLTB-2475 pure-ftpd: PAM audit_log_acct_message() failed: Operation not permitted5 K: X4 ?2 Y9 P0 m* `
- G4 v5 j+ _6 C
Sol:. ^* p) C& O3 H/ ?/ F' r" z
vi /etc/pure-ftpd/pure-ftpd.conf
' U- f, ^# e3 }7 z5 ~3 n撠PAMAuthentication 隤霅寞 UnixAuthentication隤霅 ,
+ s9 q' M: K J. S#PAMAuthentication yes 閮餉圾
4 I. V1 ^% B5 ^- |* D4 BUnixAuthentication yes 瘨閮餉圾, | Y |! e" M. |! d
service pure-ftpd restart. Y8 Y7 L! _- Q) o! }. y& T( u
5 D1 E; S3 m$ J# S; S
2.
5 k& J/ X% I- E+ j' PWhen login ftp server from remote host show errors:! @2 z# r. w9 p+ ] }
connect: No route to host6 c% v! x g4 [( m4 K% X9 M* u
舫脩怎雿鈭,iptable瘝⊥閮胤AT,SOL:4 r: T. s& q& f0 G
stop iptables or 拍嗉身摰 iptables 1 r* p, B9 c. ^1 t0 O
2 P% P# k4 L0 E$ jvi /etc/sysconfig/iptables-config
8 R7 o# I& B% ~0 c& \! Q; W湔 IPTABLES_MODULES= IPTABLES_MODULES=ip_nat_ftp ip_conntrack_ftp5 M5 e( M0 ^8 x# G9 H2 J" V
service iptables reload: A4 s+ b: V( b+ p3 j# E
' {5 R: J% f4 @1 o3.
+ `1 `& X4 q3 i9 l421 Unable to read the indexed puredb file (or old format detected) - Try pure-pw mkdb' S0 W) _, \8 K2 ~% }- {5 f
Login failed." Z6 H8 e7 A+ r- e, c% s2 ], U' z
3 `) g6 ^1 X7 e8 j
SOL:* p) C& j3 x6 W% Q
vi /etc/pure-ftpd/pure-ftpd.conf
: u8 _6 ?/ X# ]8 W3 _3 v. y8 A- |撠 PureDB /etc/pure-ftpd/pureftpd.pdb 閮餉圾
- k3 b. ?6 b- H4.
" V" \' Q9 L2 ~* u7 v% Z7 }% \5 `ftp> put file
+ Q+ }/ E- N9 @' |local: file remote: file) v4 ^* X$ ]0 l/ ]4 O
227 Entering Passive Mode (122,117,11,31,193,78)
n. j( N- S! @) ]6 U+ l; A553 Can't open that file: Permission denied
9 r; W( L, E$ [/ Y* P/ c
6 C: u) D* e8 N1 O4 P ^SOL:6 E0 W7 D( _3 W$ b
ls -l /home/user1 E+ s7 j( i/ u) o4 k, {4 Q: B+ M
drwxr-xr-x. 2 root root 4096 2016-01-17 04:46 user1; w; Z" p- C9 {+ {( u1 P1 @+ L
chown user1:user1 /home/user1+ M0 y* z8 Z0 I. J! Q
2 y& V2 h8 Z1 \' s+ \
[ftp 隞也' k1 @. f7 ~ \( |
lcd 寡local桅
1 K4 P3 g$ p/ W1 u0 |9 d( r0 Q$ Rlls 亦local桅瑼獢 (蝑 !ls)1 d0 [. J9 I* t3 R" g% Z
2 ]# s4 h- w6 Z1 o, G. |; }) `' U
. ~: w8 [. G( `3 t/ ~7 p
6 a! s3 }, W' t7 I- x
. M% n4 y! U7 g" E: s8 L |
|