:
. B$ _# o, V+ |8 e" uhttp://www.111cn.net/sys/CentOS/88456.htm
- g, S( o/ X5 p4 ohttps://www.centos.bz/2011/03/centos-pureftpd-install/
$ l8 p$ |! f6 F |& Y! a
& u( n5 X% s; d* i t餈Yum摰鋆Pure-ftpd霂衣甇仿炊憒銝嚗
9 Y; q+ M# Y/ G0 o# j9 c
6 m9 v$ B8 R" n1 m' i甇仿炊銝:蝵座um皞隞乩舫撠 CentOS 6.X
8 t8 k3 @4 G$ N: {- O憭隞(憒蝵桀嗡epel皞)
5 i; F+ Z, M5 H% R, k' _* g6 Qmv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup9 c7 K3 z* i) B# J* Q3 A( f
銝頧賣郢epo /etc/yum.repos.d/
" ]/ x) e3 d: T2 N. Xwget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo3 G N* D. D) I& D' l% i9 r) m! y& {
yum makecache
7 P+ r0 W1 r2 _* u. K( U9 {8 Y+ z2 j3 P
隞乩舫撠 CentOS 5.X
2 X0 n$ B8 G9 C" N6 ^cd /etc/yum.repos.d/0 ~' R# J" i6 C- `9 N2 m# N
wget http://centos.karan.org/kbsingh-CentOS-Extras.repo/ M& B/ \# T0 i5 R
- E7 y! I- B+ |- K @
敹瞈瘣蝕bs-CentOS-Testing摨怒kbsingh-CentOS-Extras.repo隞塚enabled=0寞enabled=1
5 q7 R2 ^" c3 x9 evi kbsingh-CentOS-Extras.repo& u- c3 h: u' {- V/ D
- [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
銴鋆賭誨蝣 憒甇仿銝憭望閰,雿輻其誑銝隞:
8 s+ ?6 {4 u& _8 o6 n% `: xrpm -Uvh ftp://ftp.trychlos.org/pub/CentOS/6.3/pcalfs/x86_64/RPMS/epel-release-6-7.noarch.rpm (CentOS 6.7)# K% W# O3 }6 S9 A
銝臭誑CentOS 6.7,憒浚entOS 6.8 狂oogle 撠 epel-release-6-8.noarch.rpm頛暺,隞交迨憿
3 d2 ]6 Y* L6 M7 B1 \% u# x) S/ e% z0 c9 ?- x
甇仿炊鈭:yum摰鋆5 F3 j3 U% b- W* v1 J8 M& { o) t
yum install pure-ftpd -y
$ s" j; N# A. ?6 e4 o
/ y8 m7 B u( u) z8 ] I甇仿炊銝:靽格寥蝵格隞
: W+ l/ b8 g" ^. Q" N1 n; ?vim /etc/pure-ftpd/pure-ftpd.conf
: D6 n. W! o/ `0 G4 I
$ M% k: L* z& D1 zPureDB /etc/pure-ftpd/pureftpd.pdb. S1 K" n! D) D3 o) Q# V
#餅餈銵瘜券嚗摰頝臬嚗PureDB冽唳桀隞
- V/ ~9 o9 k; E9 |2 E& u! ZVerboseLog yes$ |& ]- E" `1 g
#撘舀亙 /var/log/pureftpd.log- [4 i {7 p+ C4 j& n. e) b
NoAnonymous yes4 ^3 H" ~, u' R Q' O) T! Y2 w J2 Y; |
#蝏踹冽瑞餃
, z. @) v7 S' {1 d! Z* sPassivePortRange 48000 500003 K$ _! |- f' x; t& _$ I2 U7 [
#雿輻刻◤冽芋撘嚗嗥垢
l1 O' e' u- d* i; E4 z2 N( K" c9 i2 T
% g9 W/ q/ j* N. G
9 o1 U/ a+ @" u% g甇仿炊:蝵桅脩怠蝑
$ g" t1 s6 h) E" V% x' B0 diptables -A INPUT -p tcp --dport 21 -j ACCEPT2 P+ Z5 v! `9 K( F7 ^2 j* ^! {
iptables -A INPUT -p tcp --dport 48000:50000 -j ACCEPT
+ { `3 b/ R( f* K, E
! B( ]3 y- c9 T/ s" k甇仿炊鈭:臬私ure-ftpd
, z; R0 J3 m7 n9 Y0 \chkconfig pure-ftpd --level 345 on (閮剖瘥甈⊿璈芸瑁)8 `; d9 w, u. ~" Z
憒曆軏hkconfig,which chkconfig 臭誑曉啣桅雿蝵,銝祆閰脣/sbin,憒/sbin銋瘝銵函內瘝摰鋆chkconfig
/ F! }6 c" h: e. }; {0 ~4 D. y7 h4 `yum install chkconfig 摰鋆chkconfig B; B1 V. ]) T/ \0 S3 \# \7 @# y
憒摰鋆摰銋 chkconfig: command not found7 K% Z! |8 A' s" j
銝蝯 - Q! Y8 q+ }# D, D; g4 _3 Q
ln -s /sbin/chkconfig /usr/bin/; v0 k- T$ H, h
4 @( @1 M2 d. f% ~" P) N& [
/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
3 F2 }) }9 K5 b# p銋雿銝蝯
! y$ W; J. J& s# @4 t+ j! |; Dln -s /sbin/service /usr/bin/5 \5 U' Z9 z& s u# Y6 F. f
! L! ~3 [' J9 F a
摰鋆 ftp client :
+ d. s* [9 ~+ @- u6 F$ uyum install ftp -y
' b* V* U- d# b: ^+ M0 X2 ~1 [5 [! J2 ?" w+ f# W6 q x
閮:3 v/ c+ h1 I0 _# u8 E; M0 t
6 q1 D8 ^ r% @' p( y5 d+ l
1.2 C8 M; T& W- P6 C: E* J) |1 T
when login ftp show error:! H( k2 S: k, P- h8 n9 A( I. L3 N
530 Login authentication failed
4 w/ P) `% Z# r0 l& L+ \7 B" j0 `Login failed.' m9 w8 ~# j' c7 G
/ q: l8 _0 u$ v
# x( c# l! W1 }* V! ?5 L
check /var/log/secure
' I" p0 O2 [2 a E1 y0 r6 Z% u6 j5 @5 hNov 3 10:03:44 DLTB-2475 pure-ftpd: pam_listfile(pure-ftpd:auth): Couldn't open /etc/ftpusers
4 Y0 \4 e+ U7 o" s/ dNov 3 10:03:44 DLTB-2475 pure-ftpd: PAM audit_log_acct_message() failed: Operation not permitted
Q. f. L4 x M4 x) m$ e' U! }( J O( m9 E1 g! y
Sol:
8 r% a& L: ~, \4 n: c% uvi /etc/pure-ftpd/pure-ftpd.conf
6 h, ]* e) V3 D* p8 e1 r6 H撠PAMAuthentication 隤霅寞 UnixAuthentication隤霅 ,$ y/ _7 [ N5 f* r0 C5 R0 G# v4 x
#PAMAuthentication yes 閮餉圾6 I3 ?, O' q- e& j# O9 d
UnixAuthentication yes 瘨閮餉圾
" N: X; X) e7 Z# {* S- oservice pure-ftpd restart- f. [- E8 J+ i- F9 k) O
+ A+ y! n3 g# r4 k2.' H: [1 `5 S! x9 C
When login ftp server from remote host show errors:
) G- P$ P( J9 o* _connect: No route to host$ b) J) f. p; w; Z# l I+ e7 v/ w& S( H
舫脩怎雿鈭,iptable瘝⊥閮胤AT,SOL:
& r) s5 ^" s6 [( k* P5 g/ n: Wstop iptables or 拍嗉身摰 iptables 8 m6 d+ N. ]- N" p
# X n- T! d: ?6 Fvi /etc/sysconfig/iptables-config
' _( B) c% |( \/ c) m湔 IPTABLES_MODULES= IPTABLES_MODULES=ip_nat_ftp ip_conntrack_ftp- C3 w2 H4 x" O6 l: E" H
service iptables reload# x+ i0 q) U8 p; x# u' I4 i
4 k0 X5 y! k, H$ d- g
3.* T. J6 Z: S) d, ^) ?0 O
421 Unable to read the indexed puredb file (or old format detected) - Try pure-pw mkdb1 z% m% v, h8 M. n+ i) y3 {
Login failed.
- z2 p) n! p* {( H( v" J/ Y- H" g6 c0 ~) `! s: G
SOL:8 M4 s, ~+ _1 T5 B
vi /etc/pure-ftpd/pure-ftpd.conf* X: a/ r; ~4 `0 P( O9 P- l0 x4 m \
撠 PureDB /etc/pure-ftpd/pureftpd.pdb 閮餉圾
- @& y$ a( |0 _5 W9 }4.
- Q Y8 O9 ?8 c% ~, [ftp> put file
. B- X6 `* R; D- y$ elocal: file remote: file
' F, `7 {# Y! g' P227 Entering Passive Mode (122,117,11,31,193,78)
C: {5 K3 W2 A1 y& v* n553 Can't open that file: Permission denied0 s4 R. Z. s' ~: u( P/ K
' m7 [" n9 j" I8 Z: m( rSOL:1 L; r. H9 @) B
ls -l /home/user1% b) c2 l1 P$ y) f
drwxr-xr-x. 2 root root 4096 2016-01-17 04:46 user13 ]$ ?( C! [( H6 @( J& U. r
chown user1:user1 /home/user12 ~( }; n# t& X( F: \/ @
2 |& r, s# F* f- D: B% @[ftp 隞也 g- p0 e4 ?, z* j3 o6 L) H' b% C1 N
lcd 寡local桅
3 e6 j" T' \ o3 klls 亦local桅瑼獢 (蝑 !ls)6 }( v H6 a$ x- Y* Q o
Q4 ^7 v, H2 {: L0 V* s/ F3 E9 _4 B3 a5 x7 F0 n
- b7 ]9 w# u0 x2 r' q
. {" F/ y9 Y" O6 K; X |
|