1. 备份配置文件 /etc/vsftpd/vsftpd.conf
[root@localhost root]# cd /etc/vsftpd/
[root@localhost vsftpd]# ls
vsftpd.conf
[root@localhost vsftpd]# cp vsftpd.conf vsftpd.conf.BAK
[root@localhost vsftpd]# ls
vsftpd.conf vsftpd.conf.BAK
2. 配置vsftpd服务器
[root@localhost vsftpd]# gedit vsftpd.conf&
[1] 4872
删除vsftpd.conf中的所有内容,然后写入一下内容:
#///////////////////////////////////////////////////
#允许匿名访问,具有上传下载权限。
anonymous_enable=YES
write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_world_readable_only=NO
#显示登陆信息。登陆信息在ftp的共享目录下的" .message " 文件中
dirmessage_enable=YES
#是否使用端口20(ftp-data)进行数据联接
connect_from_port_20=YES
userlist_enable=YES
# 以独立模式启动,
listen=YES
#///////////////////////////////////////////////////
3. 重启vsftpd服务
[root@localhost vsftpd]# service vsftpd restart
关闭 vsftpd: [失败]
为 vsftpd 启动 vsftpd: [ 确定 ]
[1]+ Done gedit vsftpd.conf
[root@localhost vsftpd]# pgrep vsftpd
4982
[root@localhost vsftpd]#
查看vsftpd是否已经正常工做。如果象上面那样有一个数字表明已经启动了,
如果没有反应,那么就没有启动,比如:
[root@localhost vsftpd]# pgrep vsftpd
[root@localhost vsftpd]#
4. 测试vsftpd服务器
(1) 方法一
现看看自己电脑的IP地址,检查IP地址是否配置好了
[root@localhost vsftpd]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:11:5B:C4:AE:A5
inet addr:192.168.0.56 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1952 errors:0 dropped:0 overruns:0 frame:0
TX packets:378 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:486797 (475.3 Kb) TX bytes:53334 (52.0 Kb)
Interrupt:11 Base address:0xe800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:17721 errors:0 dropped:0 overruns:0 frame:0
TX packets:17721 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1211137 (1.1 Mb) TX bytes:1211137 (1.1 Mb)
这里IP地址为 192.168.0.56 也就是下面这一项提示的:
inet addr:192.168.0.56 Bcast:192.168.0.255 Mask:255.255.255.0
[root@zieckey vsftpd]# ftp 192.168.0.29
Connected to 192.168.0.29.
220 (vsFTPd 1.1.3)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (192.168.0.29:root): ftp
331 Please specify the password.
Password:
230 Login successful. Have fun.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (192,168,0,29,209,131)
150 Here comes the directory listing.
drwxrwxrwx 2 0 0 4096 Nov 03 12:27 incoming
drwxr-xr-x 2 0 0 4096 Nov 03 12:06 pub
226 Directory send OK.
ftp> !ls 注:在命令前面加 ! 号是对本地目录操作
vsftpd.conf vsftpd.conf~ vsftpd.conf.BAK vsftpd.conf.BAK1 vsftpd服务器创建步骤.txt
ftp>
(2) 方法二
[root@localhost vsftpd]# gftp&
[1] 4892
[root@localhost vsftpd]#
注意,刚刚建立的 vsftpd 服务器,是具有上传下载权限的,
但是我们现在可以发现,我们并不能上传任何文件,为什么?
vsFTPd出于安全考虑,是不准让ftp用户的家目录的权限是完全没有限制的,
您可以去读一下vsFTPd的文档就明白的了;否则也不能称为最安全的FTP服务器了,对不对?
要作到这一点也简单,在/var/ftp下再建一个目录,权限是777的就行了
比如:
[root@zieckey ~]# cd /var/ftp/
[root@zieckey ftp]# mkdir incoming
[root@zieckey ftp]# chmod 777 incoming/
5. 改变ftp共享目录
[root@zieckey ftp]# cd /etc/
[root@zieckey etc]# cp passwd passwd.BAK
[root@zieckey etc]# gedit passwd&
找到ftp那一行:
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
其中 /var/ftp 就是ftp的根目录
改变它就可以改变ftp的根目录
6. 临时将想共享的目录放到ftp根目录下
这个可以用虚拟路径实现
比如:
/home/a 映射为 ftp://localhost/a
/home/b/c 则为 ftp://localhost/c
其实这个不能说是vsFTPd的内容,其实我们早就接触过了,可能我们没有注意,我们可以通过如下的方法来实现。
[root@localhost ~]# mount --bind [原有的目录] [新目录]
比如我们想将 /home 目录也能通过 ftp 共享给远程用户
那么我们可以这样做:
我们要先在/var/ftp目录中建一个目录
[root@zieckey etc]# mkdir /var/ftp/home
[root@zieckey etc]# mount --bind /home/ /var/ftp/home/
这样就好拉。
现在可以查看一下:
[root@zieckey ftp]# ls /var/ftp/home/
download download(2) work zieckey
可以看到 /var/ftp/home 目录下有了 /home 目录的内容
如果又不想将 /home 共享了呢?使用 umount 就行拉
[root@zieckey ftp]# umount /var/ftp/home/
[root@zieckey ftp]# ls /var/ftp/home/
[root@zieckey ftp]#


84.120.95.* 于 2007-06-03 06:24:02发表:
72073635f006c34d661e6e1f761ca6d7 http://golosarhopasticceria.bdizoa.org/lineamento-dottrina-pura-diritto/index.htm pinter ferenc little nemo mela normandia distillato calvados http://machinavaporizzazioneaspirazione.sdibjo.org/capodanno-chalet-terminillo/index.htm http://canettisefarditi.bdizoa.org/comune-chiaramonte-guelfi-rg-it/index.htm allenamento intermittenti calciatore http://rosislampadarioverona.shxghd.org/scarica-mp3-cristian-abbondati/index.htm immagine corno portafortuna consorzio banca sella guardia giurata http://damaescortsicompagniabucuresti.ksibgs.org/olivetti-synthesis-scrivania/index.htm 691e5261e7f26fe9bfca38d324fb1940
80.35.199.* 于 2007-06-02 10:37:55发表:
de87e1c5924393986cd471b7c2fec335 pesce farfalla fasciato gigante monte prama noleggio tensostruttura emilia 1962 cicciobello http://serafinoveryetnico.beajbg.org/traduzione-bohemian-rapsody/index.htm http://schemacavolptwindowscommander.beajbg.org/craccare-mediaset-premium/index.htm http://aishwariaraiattriceindiana.inkrxe.org/1700-lettera-comandante-portoghese-moglie/index.htm http://spaccalegnaverticalefoto.akqcvy.org/affettatrice-nuova-volano-berkel/index.htm demone dostoevskij scheda libro http://mummiesilenzionenellalto.seyzuo.org/vaccino-ticovac/index.htm 63aa5c5d6850cbd0ab7a0b3644130d9e
201.255.85.* 于 2007-06-01 15:56:57发表:
5ad1cffbcb32e2314c0a90f86aa8b317 vampira masquerade sito ufficiale http://sacroileitetrauma.pdjkai.org/barca-gobbo-375-sc-data-costruzione/index.htm http://fotoabbassamenticartongesso.leikrf.org/ille-roif-it/index.htm http://produttorestendibiancheriaalluminio.leikrf.org/feudo-castellina-pianta-famiglia-medico/index.htm http://pesciolinoflounder.mljuyb.org/testo-canzone-presly/index.htm http://fotoabbassamenticartongesso.leikrf.org/amministratore-condominio-pirri/index.htm testa equatoriale telescopi http://camaleontecamole.gkgobd.org/taurina-eccitante/index.htm http://quantaacquaberedopocreatina.gkgobd.org/varsavia-someplace-else/index.htm revlon prodotto parrucchiera 5447788e0ee79eeca3d64876f41eb1cf
190.72.253.* 于 2007-05-30 08:13:06发表:
d1d1e596c53ec711945caa10b5f7b03e http://ovvkft.org/projeto/projeto-jaiba.html http://pegekq.org/fisiopatologia/fisiopatologia-cefaleia.html http://pegekq.org/tres/tres-espia-demais.html programacao http://pegekq.org/telefone/telefone-marina-gloria-evento-rj.html consciente http://mnopyi.org/gabarito/gabarito-2007-supletivo.html http://wfcqxw.org/palavra/palavra-sao-vibracoes.html http://pegekq.org/onda/onda-gigantescas.html http://ovvkft.org/resumao/resumao-regencia.html a91f06099d8916d08fc86aebeef191c8
190.72.121.* 于 2007-05-29 06:55:39发表:
d99fdcea24ff469d7c353660afe7bd37 farmacia http://lcitij.org/villa/villa-jequitimar.html teste http://xvqeoy.org/guapore/guapore-rs-com-br.html http://xvqeoy.org/verbo/verbo-pronominais.html hackear http://grpytd.org/projetor/projetor-sharp.html trocadilhos porto http://grpytd.org/clarotorpedo/clarotorpedo-gratis.html ea84313ff4cf4b8bb8ec851c693c83a5
80.33.32.* 于 2007-05-28 14:49:53发表:
97b492bcb4788f3a5670ce3b7c3d8e66 http://mnopyi.info/daniel/daniel-radcliffe-posa-nu.html http://xvqeoy.info/secretaria/secretaria-saude-cidade-contagem-minas-gerais.html http://pegekq.info/tv/tv-correio-sintonizar.html http://ifrtox.info/costume/costume-afro-brasileiros.html http://pegekq.info/saber/saber-informacao-atuais-concurso-esa.html http://ifrtox.info/complexo/complexo-agro-industrial-producao.html http://ifrtox.info/autas/autas-hora.html http://ifrtox.info/manha/manha-rio-grande-theft-auto-3.html ouvir http://mnopyi.info/principio/principio-gerais-recurso-processo-civil-brasileiro.html 921da3b25f91ff5411abb8e73f72697f
83.49.139.* 于 2007-05-27 23:09:05发表:
6f31b66fc2e2303fa5b6030af93c0b2d http://ovvkft.info/lingua/lingua-portuguesa-texto-literario-e-nao-literario.html medico http://ovvkft.info/site/site-ig-br-via-funchal.html http://ovvkft.info/co/co-processamento-tec-ambiental.html http://lcitij.info/tecnica/tecnica-mistura-tinta.html http://ovvkft.info/lolita/lolita-nabokov-baixar.html http://xwqumn.info/formatador/formatador-imagem.html ant site festa 6d9dd05b81c19c63ae8e87cbbcfe2050
88.25.108.* 于 2007-05-27 07:00:21发表:
476cae3fb23b74182434b2dc1ddfd47f http://pegekq.info/br/br-fastao.html http://mnopyi.info/revista/revista-luxury-printing-vicente-gil.html http://mnopyi.info/alerta/alerta-de-mensagem.html http://xvqeoy.info/jocar/jocar-automovel.html http://mnopyi.info/emei/emei-campo-limpo.html hospital http://xvqeoy.info/jogo/jogo-copo.html http://mnopyi.info/ninfeta/ninfeta-trepando-menina-trepando.html programa ciaxa 899833c87d41a40d77c99858b4681e10
83.60.48.* 于 2007-05-26 16:54:26发表:
0984d74f71302515c47b8fd924baf993 poesia http://xwqumn.info/onibus/onibus-turismo-guaruja.html http://ovvkft.info/download/download-raca-negra.html http://xwqumn.info/resumo/resumo-livro-letra-escarlate-nathaniel-hawthorne.html http://ovvkft.info/vamos/vamos-trabalho.html tecido mensagem http://sxrzpn.info/sinuca/sinuca-gamezer.html ministerio http://xwqumn.info/manjar/manjar-dos-deus.html 3c6c60ce2277246c0f4063c97808fccb
190.38.80.* 于 2007-05-26 00:54:30发表:
c506b183519b9be70e124cabd0073753 http://soluzioni-pro-evolution-soccer-5.nuusjq.org/ http://idirizzi-telefonia-cellulare-come-050-pistoia.lxcjch.org/ http://legge-n-243-23-08-2004.pmdxoz.org/ http://ordine-dei-giornalista-consiglio-regionale-campania.itwasb.org/ http://calcolo-ph-acido-debole-base-forte.lxcjch.org/ http://i-cento-passi-colonna-sonora.itwasb.org/ http://schema-trazione-integrale-panda-4x4.qumpvr.org/ http://catalogo-arma-ad-aria-compressa.qumpvr.org/ http://link-agenzia-organizzazione-meeting-convention.itwasb.org/ http://need-for-speed-underground2-codice-ps2.qumpvr.org/ f4e92eaca3a0992e5377af9d5fb45ea4
201.243.26.* 于 2007-05-25 04:59:11发表:
6143827f524c7ca0747fe268109eef92 http://ristorante-agriturismo-trattoria-verona-prezzo.hgfrvc.org/ http://nautica-diporto-componente-motore-ed-equipaggiamenti.hgfrvc.org/ http://colin-mcrae-04-trucco-ps2.lwozoc.org/ http://film-notturno-indiano-regia-alain-corneau.ljznde.org/ http://schema-collegamento-poli-motore-eletrico-pdf.ikqtqu.org/ http://diario-segreto-di-patrizia-b.rsxmtx.org/ http://radioradicale-it-processo-cuffaro-aiello.xrpkif.org/ http://trucchi-vampire-the-masquerade-bloodlines.rsxmtx.org/ http://contratto-locazione-ad-uso-professionale.ljznde.org/ http://acer-aspire-e380-91-eeb7z-if8.lwozoc.org/ 46517f671cf87061af6ace763c7eda9d
200.126.246.* 于 2007-05-24 12:54:58发表:
7ca6fade5d2df1e2ef8ef8610880bdf0 http://madonna-testo-what-feels-for-girl.qumpvr.org/ http://donna-vogliosa-livorno-cercano-uomo.itwasb.org/ http://fondo-investimento-successione-coniuge-mediolanum.lxcjch.org/ http://trucco-gioco-king-arthur-ps2.sfmyzx.org/ http://agenzia-entrata-friuli-venezia-giulia.pmdxoz.org/ http://san-marino-negozio-soft-air.itwasb.org/ http://posizione-rimanere-incinta-utero-retroverso.itwasb.org/ http://plug-play-cava-dei-tirreni.sfmyzx.org/ http://commercializzazione-suino-nazionale-ed-estero.qumpvr.org/ http://hotel-di-torino-a-ore.pmdxoz.org/ 7798902e03c54f1db3af807b5937ee1b
201.210.19.* 于 2007-05-16 03:19:36发表:
http://fab47003b5b8c9a694b476d511f3b129-t.qwoypw.info fab47003b5b8c9a694b476d511f3b129 http://fab47003b5b8c9a694b476d511f3b129-b1.qwoypw.info fab47003b5b8c9a694b476d511f3b129 http://fab47003b5b8c9a694b476d511f3b129-b3.qwoypw.info b43a48a848da56275457e93295654b68
AdrianNet 于 2007-04-11 09:30:56发表:
:ha3nd