:. [& E: g$ v, B+ I) Y ^
http://www.111cn.net/sys/CentOS/88456.htm- q0 h! O8 l- L
https://www.centos.bz/2011/03/centos-pureftpd-install/
. P! s+ q: I8 q
6 N7 K$ j$ H1 T; z餈Yum摰鋆Pure-ftpd霂衣甇仿炊憒銝嚗
0 j* E9 z& {6 j( o9 |' z2 ^% d7 ]$ Z5 ?
2 A+ E# C6 A7 z( F甇仿炊銝:蝵座um皞隞乩舫撠 CentOS 6.X3 P" f& I( v0 Y8 U
憭隞(憒蝵桀嗡epel皞)
8 U7 f ? _, r4 Y2 Wmv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
8 y5 X0 Y* T+ E3 q3 Y5 [* t; K銝頧賣郢epo /etc/yum.repos.d/
: x! h( ?' C Y; L) a! O+ T& Vwget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
9 j+ s( R& A! s9 S7 nyum makecache! c* O. j& ], ?; Y
' q; Q/ L5 r: Y% G' H% G# b; ^隞乩舫撠 CentOS 5.X
3 }& m( P5 u" ~2 Ncd /etc/yum.repos.d/
# z a3 v- `6 {' Lwget http://centos.karan.org/kbsingh-CentOS-Extras.repo
6 \) j3 A5 v& R) S& c2 k: {! s0 m5 K& p, p
敹瞈瘣蝕bs-CentOS-Testing摨怒kbsingh-CentOS-Extras.repo隞塚enabled=0寞enabled=1
' C* I0 y' n3 i. P9 ]vi kbsingh-CentOS-Extras.repo
5 R% z1 Y* ]) l4 [3 j, O7 b8 L- [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
銴鋆賭誨蝣 憒甇仿銝憭望閰,雿輻其誑銝隞:" l3 l- ^* w( |2 d1 w
rpm -Uvh ftp://ftp.trychlos.org/pub/CentOS/6.3/pcalfs/x86_64/RPMS/epel-release-6-7.noarch.rpm (CentOS 6.7) Q. c% d4 J, r. K9 ?
銝臭誑CentOS 6.7,憒浚entOS 6.8 狂oogle 撠 epel-release-6-8.noarch.rpm頛暺,隞交迨憿
- I' l/ C& q3 J2 Y- J: t+ F6 p8 j6 h" S
甇仿炊鈭:yum摰鋆
( L; \" a g" u! ?( a) h2 _7 vyum install pure-ftpd -y7 y, ?4 x6 B* j/ k. x( ]% r: J. L
- A; l2 _; q. E& c5 q$ T3 K甇仿炊銝:靽格寥蝵格隞3 T: `, K* \* f* g9 y- H; @
vim /etc/pure-ftpd/pure-ftpd.conf
\) W" a: I( f) t0 X7 {' q+ y+ N
/ o5 g1 X) r* |" _6 IPureDB /etc/pure-ftpd/pureftpd.pdb
t7 e" u. \4 H4 d" O% A#餅餈銵瘜券嚗摰頝臬嚗PureDB冽唳桀隞
- m* Q9 ~( L- H1 j/ e# XVerboseLog yes0 E' \; a" z8 n4 `4 D6 X8 Z' z
#撘舀亙 /var/log/pureftpd.log
0 U: F. l% P k& r; jNoAnonymous yes" K+ {4 E9 ^' g# U
#蝏踹冽瑞餃 z& x3 q4 H0 u- H' P" z& e
PassivePortRange 48000 500008 w0 `( K( Q5 v
#雿輻刻◤冽芋撘嚗嗥垢. U d8 p8 I9 z. Z
. Q* P* X% o& \8 H& Z
, ]' u% B0 L$ z2 g) P
5 i; g0 V' D! h' Z) K2 j# H甇仿炊:蝵桅脩怠蝑
' C+ _6 R' ^& G* h J& y5 ~/ m7 [! l1 piptables -A INPUT -p tcp --dport 21 -j ACCEPT
0 G2 s! F _3 c. Kiptables -A INPUT -p tcp --dport 48000:50000 -j ACCEPT _7 C- \! D6 t+ K
1 c- k9 H% r' k# w4 e
甇仿炊鈭:臬私ure-ftpd9 N8 w# B. j" _# E5 ~) ^
chkconfig pure-ftpd --level 345 on (閮剖瘥甈⊿璈芸瑁): |" o$ n+ P7 V' M7 ]$ p, R, Y$ x
憒曆軏hkconfig,which chkconfig 臭誑曉啣桅雿蝵,銝祆閰脣/sbin,憒/sbin銋瘝銵函內瘝摰鋆chkconfig2 \! \; ?# C: T4 L. t
yum install chkconfig 摰鋆chkconfig$ d/ y8 ?: V( k9 u# ?5 c8 n3 `3 w
憒摰鋆摰銋 chkconfig: command not found8 v) a( n n) c* e
銝蝯
5 W0 [% g6 J8 X: m' F# q% l, F$ nln -s /sbin/chkconfig /usr/bin/ C: s2 S1 E7 m( B4 V# ], r0 R4 |! @
( u1 @* W+ O% U5 M S. \" Q/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
/ g j% K1 \& U6 U# R$ g銋雿銝蝯
" ?$ |; V- n2 j$ Jln -s /sbin/service /usr/bin/1 e# g( c: @% `( P$ B
( N& [/ q6 Y7 _: I摰鋆 ftp client :$ x* u2 o; k, Y; l4 T( Z
yum install ftp -y- R" F O9 L4 o4 _/ T9 p# T0 n% j
/ u$ W, T. O. g8 }4 Q
閮:( k* Z+ N" w3 W3 E
9 k2 a) t/ ` d9 G1.. l; a8 `, M# C
when login ftp show error:+ e' N% t* }- a! R l0 b3 ]. g
530 Login authentication failed
& z0 ]' S9 W4 O/ kLogin failed. a8 U4 E' x- f6 ~( o: {( D
5 |, Q# Z# X) L4 ~" h
. g: n( X- Z0 F( ?- K
check /var/log/secure8 I. a# X. B4 v7 O
Nov 3 10:03:44 DLTB-2475 pure-ftpd: pam_listfile(pure-ftpd:auth): Couldn't open /etc/ftpusers
' J* a( A: D( _' i: ~Nov 3 10:03:44 DLTB-2475 pure-ftpd: PAM audit_log_acct_message() failed: Operation not permitted3 \$ d/ ?1 o; z. l: U# u5 V
" L: u, a4 X$ x# d9 B8 TSol:5 b" x" k9 ]' a% v0 `8 ^, B
vi /etc/pure-ftpd/pure-ftpd.conf: A$ S. @: S6 x& q) {* g
撠PAMAuthentication 隤霅寞 UnixAuthentication隤霅 ,
- [- v2 \# }. D% m#PAMAuthentication yes 閮餉圾- W: z0 |1 O9 s j" K6 s
UnixAuthentication yes 瘨閮餉圾
& W; J3 \+ T/ }5 Nservice pure-ftpd restart* G1 u8 k! b, ~% v; \
4 ~$ B% N; B4 z% X! ^8 q! f+ I
2.
% Q; p7 {* B5 L9 Y9 i0 c- LWhen login ftp server from remote host show errors:6 a% A- u# v6 _* K
connect: No route to host
( V6 |( m7 s: C* o `( r舫脩怎雿鈭,iptable瘝⊥閮胤AT,SOL:3 C: ]$ s. N7 I$ I6 {
stop iptables or 拍嗉身摰 iptables 4 z5 Y3 T) s4 Y" }# y+ |+ |8 Z
; [0 s8 V$ k# [! g
vi /etc/sysconfig/iptables-config5 w9 \8 v% n" {/ P$ J# g- C4 r
湔 IPTABLES_MODULES= IPTABLES_MODULES=ip_nat_ftp ip_conntrack_ftp
+ j: q/ l9 Z& T3 w- m$ u0 l- E" oservice iptables reload
9 n8 t! n. ~3 F0 v0 F: M$ a% z" e& @
! S4 g( l! i4 L0 M# G3.6 r" C1 H# \6 ], D+ p0 {
421 Unable to read the indexed puredb file (or old format detected) - Try pure-pw mkdb
2 w, U1 k5 {6 [% J8 o; m% [2 aLogin failed.
5 J; F, O1 p S7 Q% H: G% Y5 U" j* ^- Y7 z0 }! X. q
SOL:
6 p/ p6 I. h) P& bvi /etc/pure-ftpd/pure-ftpd.conf* i! {& L9 }' t7 E
撠 PureDB /etc/pure-ftpd/pureftpd.pdb 閮餉圾! m. a3 A0 k6 ]# r: @$ e3 k, X v9 i
4.
( q( J( b) |0 ~ftp> put file
6 Y1 f# o3 P" ]9 A- y/ k0 [- Wlocal: file remote: file7 c& ^! V; J: g5 p4 S2 G& \& h
227 Entering Passive Mode (122,117,11,31,193,78)
' M4 r( O! B5 D) E( e553 Can't open that file: Permission denied
6 Z8 Y: G2 h4 o6 F) g9 C) ~& u$ k8 q: d( v a( K
SOL:
+ B5 `. }7 }7 b% a* G$ Ils -l /home/user1
4 I2 e% A. P+ e3 ddrwxr-xr-x. 2 root root 4096 2016-01-17 04:46 user1
6 V9 H ]; K9 W" b9 Y3 S" z) U/ @chown user1:user1 /home/user1
1 @5 J; [ U% U7 a6 }" ?0 z& x' s/ \) Z
[ftp 隞也
; X! Z2 i0 B+ J: v+ Y3 k9 vlcd 寡local桅; b& i4 @+ R% M0 B) d: E
lls 亦local桅瑼獢 (蝑 !ls)! P/ A0 [& R% n
2 Y8 X0 p# ^4 x6 u$ M: m: d+ x
3 x5 x" V" F% \: _0 @/ f' p
% T/ @/ a# g( Z5 q% |; M) Q6 i+ E- p" a3 C; u7 V3 c; W8 M
|
|