:9 j$ ~ M- q0 S8 u, L+ l! M: N9 _
http://www.111cn.net/sys/CentOS/88456.htm
/ j# S7 l* n- J6 S7 o; P4 Rhttps://www.centos.bz/2011/03/centos-pureftpd-install/9 S D& U9 X! X8 k: n* O
X9 K1 N$ a3 q+ X* |: S( s餈Yum摰鋆Pure-ftpd霂衣甇仿炊憒銝嚗
9 e/ H$ ]. S ~2 h5 D0 ~' V! d* K6 O/ [& N. B: x( v
甇仿炊銝:蝵座um皞隞乩舫撠 CentOS 6.X6 ]& E% A( V; X6 I& U# ^+ F: z2 j# ~
憭隞(憒蝵桀嗡epel皞)7 N. n. m. t2 Y$ D v. m M6 T, U* n! Z
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
; l5 a- x2 \7 _; ^- b* H. a銝頧賣郢epo /etc/yum.repos.d/# R( _6 s* `$ n( B' Y9 {
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo' j, M$ V/ Z/ W7 D! F* n
yum makecache6 m1 f h& @0 e1 J: E5 g
# N6 N& q0 ]$ @3 H' _' J I
隞乩舫撠 CentOS 5.X
. `, G+ H9 h. }7 o4 N) `cd /etc/yum.repos.d/6 K J& B/ L" I1 I5 H( y+ f! _" o
wget http://centos.karan.org/kbsingh-CentOS-Extras.repo$ F" }% a$ O) d! z
: D z! H: G0 J- p
敹瞈瘣蝕bs-CentOS-Testing摨怒kbsingh-CentOS-Extras.repo隞塚enabled=0寞enabled=1
# U# T6 ^4 N: X5 z' }! _* vvi kbsingh-CentOS-Extras.repo; n- u5 J d& K# H3 n6 k. s
- [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
銴鋆賭誨蝣 憒甇仿銝憭望閰,雿輻其誑銝隞:( M- `4 h" M+ f* q# \
rpm -Uvh ftp://ftp.trychlos.org/pub/CentOS/6.3/pcalfs/x86_64/RPMS/epel-release-6-7.noarch.rpm (CentOS 6.7)
1 E) P1 n }* P9 ~& k+ @; I銝臭誑CentOS 6.7,憒浚entOS 6.8 狂oogle 撠 epel-release-6-8.noarch.rpm頛暺,隞交迨憿
+ y- U. H/ ], ^4 F6 M5 E( b) h1 K! \# P: l! ^) z
甇仿炊鈭:yum摰鋆
3 `& ~6 H/ Z. C4 r9 Yyum install pure-ftpd -y
8 c6 e% D l3 T1 w! v4 a' ^
7 a& {0 E# y) g& v3 R甇仿炊銝:靽格寥蝵格隞: T% Z' z( h8 t
vim /etc/pure-ftpd/pure-ftpd.conf
$ y) G' k& t* u: y) {3 p- O% j, ~& C/ ^0 ~! V
PureDB /etc/pure-ftpd/pureftpd.pdb
1 Z' C& [, f3 c6 f% j! \+ M, {( X#餅餈銵瘜券嚗摰頝臬嚗PureDB冽唳桀隞7 Z/ p% Q$ W4 X5 e" F
VerboseLog yes
T, m* s3 @0 t#撘舀亙 /var/log/pureftpd.log
& {! a0 p' _7 w3 Y1 l" K7 ZNoAnonymous yes
: C% v- `& g, r#蝏踹冽瑞餃9 m4 F, ]0 h& a, D1 M/ T
PassivePortRange 48000 50000
! Z) a4 q+ i0 N4 C$ n! T e#雿輻刻◤冽芋撘嚗嗥垢
; Z, r) g4 F, ]# q" `- I( a
6 w2 b+ p" N$ _" b/ `
9 Y9 O* m8 N4 S. C* t+ \( z& M) A3 @. ?2 K" c
甇仿炊:蝵桅脩怠蝑1 \% z8 ], Y$ @3 v5 [, `
iptables -A INPUT -p tcp --dport 21 -j ACCEPT
" u' r2 _( q: jiptables -A INPUT -p tcp --dport 48000:50000 -j ACCEPT
# k* H' T1 @( F$ ^0 Y
2 M0 R+ {, C+ s) ?% U, C甇仿炊鈭:臬私ure-ftpd
; Z( K+ `7 Z* q' V; y4 e* ychkconfig pure-ftpd --level 345 on (閮剖瘥甈⊿璈芸瑁)
4 y2 I5 Q4 l3 Y憒曆軏hkconfig,which chkconfig 臭誑曉啣桅雿蝵,銝祆閰脣/sbin,憒/sbin銋瘝銵函內瘝摰鋆chkconfig
; g$ }9 L; b( m" e9 C" `yum install chkconfig 摰鋆chkconfig* H$ n: e8 t- C
憒摰鋆摰銋 chkconfig: command not found
& b# E- b" u2 W- P: Y0 I0 d銝蝯
( L( D+ g- R+ X3 h3 Iln -s /sbin/chkconfig /usr/bin/) ]/ p8 t9 Z+ U) h
& k" o3 u6 b. ?0 R
/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
2 Q0 M8 E0 }: s* B. T9 D. n# K' T銋雿銝蝯4 ^0 a5 P" v {* [$ H9 I
ln -s /sbin/service /usr/bin/. {" M8 j/ Y- Y% Y- ^
! E6 r1 u* t0 h J; O9 \: v/ Y; w( V
摰鋆 ftp client :
4 Q% V& R, n# p* Cyum install ftp -y1 Z7 r: d# y( R% m$ z
3 W! ~' u; S. T' h- W$ m閮:
& q4 l8 E. `' U# q; E o0 R0 p& c6 w! M7 [/ G# ^6 S7 P
1.; d, A) H) A" {, P9 ]
when login ftp show error:
2 I" F- Z) N9 D530 Login authentication failed& d! D! U% Y! m9 M* Q
Login failed.3 e2 Z' F; B e
9 Q/ v8 S& p5 I! B) P \! \
, `8 y- |1 Q! Z. R; v* }8 hcheck /var/log/secure
/ C2 }+ W" A: F/ _8 P5 Q8 eNov 3 10:03:44 DLTB-2475 pure-ftpd: pam_listfile(pure-ftpd:auth): Couldn't open /etc/ftpusers1 r+ ]2 F9 L" ]. _1 Y
Nov 3 10:03:44 DLTB-2475 pure-ftpd: PAM audit_log_acct_message() failed: Operation not permitted. g- g4 {+ a& O
1 u6 b% b. ]& ?0 W- W; C) zSol:( x$ X% p8 E; a; M4 ~
vi /etc/pure-ftpd/pure-ftpd.conf1 R1 ^7 ?" ~8 ?, Z, g7 n3 b4 D/ J
撠PAMAuthentication 隤霅寞 UnixAuthentication隤霅 ,
# @2 W' l5 B6 j1 u' |#PAMAuthentication yes 閮餉圾" [) [7 p" ~/ |" W5 }2 u. V
UnixAuthentication yes 瘨閮餉圾
; \- u1 `$ z. ^ {/ ^service pure-ftpd restart
, r9 I) ^0 {, U/ V6 n! E1 ?0 f! \
2.
% B/ v5 P9 [$ m& h/ ~: f& o$ tWhen login ftp server from remote host show errors:
& G9 Y$ B& y6 H, mconnect: No route to host) _0 Z& S5 q1 v* I2 R6 Q5 y& k$ w
舫脩怎雿鈭,iptable瘝⊥閮胤AT,SOL:# N( J- C2 O1 z. o- G$ {
stop iptables or 拍嗉身摰 iptables
0 q9 d: r) i# Y; x2 E1 A- N! b
2 D% V: z$ Y) s+ X9 H/ `vi /etc/sysconfig/iptables-config
: c. s9 j# |6 G6 e. r湔 IPTABLES_MODULES= IPTABLES_MODULES=ip_nat_ftp ip_conntrack_ftp! ~; Z+ D# a- s" {+ o. ^8 N# q. B
service iptables reload
. D S% f! w: `
, W X; C, ^0 x5 J0 f* S8 Q3.# L8 B. C& K' O
421 Unable to read the indexed puredb file (or old format detected) - Try pure-pw mkdb/ Q6 Y% B7 v: f# \ a5 [+ h) A7 q" P
Login failed.9 ?2 r0 Z& ?5 Z1 g: T9 ]# }. W+ e
! x. q) J; ]2 z% n, c; [SOL:
6 L5 q {: |. F O* U. Z( rvi /etc/pure-ftpd/pure-ftpd.conf. d' A$ ?+ x4 @* k
撠 PureDB /etc/pure-ftpd/pureftpd.pdb 閮餉圾) q" @4 _+ H. @9 D4 f% l
4.: Z5 c0 j# b% X- U, S1 Z$ z% P
ftp> put file
! |! |+ ]7 B& Slocal: file remote: file. I, s- E) b5 _ C9 j
227 Entering Passive Mode (122,117,11,31,193,78)
1 C% g: k2 q6 d553 Can't open that file: Permission denied' {" Z1 e; M* ~4 q5 N
/ T0 b7 r# w2 S% a6 O, M% [
SOL:/ s; y+ [$ j( }+ e
ls -l /home/user1
7 k. G6 k9 `$ R7 d8 l- v+ xdrwxr-xr-x. 2 root root 4096 2016-01-17 04:46 user13 M" g) p$ Q; }. Q* W2 y- Z8 z: ~
chown user1:user1 /home/user1" C; m; d: H1 t( h
* ^4 r" J6 M" T7 L1 \* Y[ftp 隞也
. [7 | j. b* f# X, m: elcd 寡local桅
0 o; q0 E# l4 D' K2 ulls 亦local桅瑼獢 (蝑 !ls)
7 b7 |8 g$ q B, y3 a/ a; J/ C9 F3 n& i
* P$ h# M7 `" f/ I) [: f/ s1 i! [/ @9 s) k, G4 | M# l R
7 @8 Z1 J7 B( n3 `2 Q* T6 g
|
|