A na-ebufe mbufe Faịlị na netwọk site na sava FTP ahaziri nke ọma. Usoro ogbako dị otú a na-arụ ọrụ site na iji TCP na nhazi ụlọ ọrụ nke ndị ahịa ma na-eji njikọ dị iche iche maka netwọkụ iji hụ na nnyefe nke iwu n'etiti ọnụ jikọọ ọnụ. Ndị ọrụ ejikọtara na otu Bochum na-eche ihu na mkpa ịhazi sava FTP onwe onye dabere na ihe ụlọ ọrụ na-enye ọrụ ndozi saịtị ma ọ bụ sọftụ ọzọ. Na-esote, anyị ga-egosipụta otu esi ekepụta sava dị otu na Linux na iji otu ọrụ dịka ọmụmaatụ.
Mepụta sava FTP na Linux
Taa, anyị ga-eji ngwá ọrụ akpọrọ VSftpd. Uru nke sava FTP dị otú ahụ bụ na ọ na-arụ ọrụ na ọtụtụ sistemụ arụmọrụ na ndabara, na-ejigide mkpokọta nke nkesa Linux dị iche iche, ọ dịkwa mfe ịhazi maka ịrụ ọrụ kwesịrị ekwesị. Site n'ụzọ, ejiri FTP a rụọ ọrụ na Linux kernel, ọtụtụ ụlọ ọrụ Bochum na-atụ aro ịwụnye VSftpd. Ya mere, ka anyị leba anya na ntinye nke usoro na nhazi nke ngwa ndị dị mkpa.
Kwụpụ 1: Wụnye VSftpd
Site na ndabara, ọba akwụkwọ VSftpd niile achọrọ adịghị etinye na nkesa, yabụ ịkwesịrị iji aka ị budata ha site na njikwa. A na-eme ya dị ka ndị a:
- Mepee "Ọnụ" ọ bụla dabara adaba, dịka ọmụmaatụ, site na menu.
- Ndị nwe Debian ma ọ bụ Ubuntu nke mbipụta mkpa ịdebanye aha iwu
wụnye apt-nweta wụnye vsftpd
. CentOS, Fedora -yum wụnye vsftpd
, na nke Gentoo -iputa vsftpd
. Mgbe iwebata, pịa Banyebido ịmalite nrụnye. - Ji okwuntughe kwesiri ekwesi
- Chere maka mmecha nke ịgbakwunye faịlụ ọhụrụ na sistemụ ahụ.
Anyị na-adọta uche nke ndị nwe CentOS na-eji sava mebere raara onwe ha nye nke sava ọ bụla. Youkwesiri imelite modulu OS kernel, n'ihi na n'enweghị usoro a, njehie dị oke njọ ga-apụta n'oge nrụnye. Tinye iwu ndị a
mmelite ohuru
rpm -Uvh //www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum wụnye yum-plugin-fastestmirror
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-3.15.6-1.el7.elrepo.x86_64.rpm
yum wụnye kernel-ml-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-devel-3.15.6-1.el7.elrepo.x86_64.rpm
yum wụnye kernel-ml-devel-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-doc-3.15.6-1.el7.elrepo.noarch.rpm
yum wụnye kernel-ml-doc-3.15.6-1.el7.elrepo.noarch.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-heads-3.15.6-1.el7.elrepo.x86_64.rpm
yum wụnye kernel-ml-nkpu-isi-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-tools-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-tools-libs-3.15.6-1.el7.elrepo.x86_64.rpm
yum wụnye kernel-ml-tool-libs-3.15.6-1.el7.elrepo.x86_64.rpm
yum ịwụnye kernel-ml-tool-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-tools-libs-devel-3.15.6-1.el7.elrepo.x86_64.rpm
yum wụnye kernel-ml-tool-libs-devel-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/perf-3.15.6-1.el7.elrepo.x86_64.rpm
yum wụnye perf-3.15.6-1.el7.elrepo.x86_64.rpm
wget //mirrors.neterra.net/elrepo/kernel/el7/x86_64/RPMS/python-perf-3.15.6-1.el7.elrepo.x86_64.rpm
yum wụnye Python-perf-3.15.6-1.el7.elrepo.x86_64.rpm
yum --enablerepo = elrepo-kernel wụnye kernel-ml
Mgbe ịmechara usoro a, gbaa faịlụ nhazi ahụ n'ụzọ ọ bụla./boot/grub/grub.conf
. Gbanwee ihe ndị dị na ya ka n'ikpeazụ usoro ndị a nwere ụkpụrụ dị mma:
ndabara = 0
oge elekere = 5
aha vmlinuz-4.0.4-1.el7.elrepo.x86_64
mgbọrọgwụ (hd0.0)
kernel /boot/vmlinuz-4.0.4-1.el7.elrepo.x86_64 console = hvc0 xencons = tty0 root = / dev / xvda1 ro
initrd /boot/initramfs-4.0.4-1.el7.elrepo.x86_64.img
Mgbe ahụ ị ga-emegharị sava ahụ raara onwe ya nye ma gaa na ntinye nke sava FTP na kọmputa ahụ.
Nzọụkwụ 2: Mbido FTP Server Mbido
Tinyere mmemme ahụ, ebudatara faịlụ nhazi ya na kọmputa, na-amalite site na ọrụ sava FTP. A na-eme ntọala niile n'otu n'otu dabere na nkwenye nke ndị ọbịa ma ọ bụ mmasị gị. Anyị nwere ike gosipụta otu esi emeghe faịlụ a yana ihe ndị elere anya kwesịrị ị attentiona ntị.
- Na sistemụ arụmọrụ Debian ma ọ bụ Ubuntu, faịlụ nhazi ahụ na-agba dị ka nke a:
sudo nano /etc/vsftpd.conf
. Na CentOS na Fedora, ọ nọ n'ụzọ/etc/vsftpd/vsftpd.conf
na Gentoo -/etc/vsftpd/vsftpd.conf.example
. - Faịlị n’onwe ya na-egosi na njikwa ma ọ bụ onye edemede ederede. Biko mara isi ihe dị n'okpuru. Na faịlụ nhazi gị, ha kwesịrị inwe otu ụkpụrụ.
amaghi_enable = O dighi
local_enable = EE
Writ_enable = EE
chroot_local_user = EE - Mee ederede ndị fọdụrụ na onwe gị, mgbe nke ahụ gasị, echefula ịchekwa mgbanwe ndị ahụ.
Kwụpụ 3: dinggbakwunye onye ọrụ dị elu
Ọ bụrụ n’ịgaghị arụ ọrụ na sava FTP site na nnukwu akaụntụ gị ma ọ bụ ịchọrọ ịnye ndị ọrụ ndị ọzọ ohere, profaịlụ emepụtara ga-enwerịrị ikike karịrị nke na ịnweta ike VSftpd anaghị eme ka nnabata nweta njehie.
- Na-agba ọsọ "Ọnụ" ma tinye iwu a
onye tinye sudo adduser1
ebe onye ọrụ1 - Aha nke akaụntụ ọhụrụ. - Nịm paswọọdụ ya, wee gosipụta ya. Na mgbakwunye, anyị na-akwadosi ike ka ị cheta ndekọ ụlọ nke akaụntụ ahụ, n'ọdịnihu ị nwere ike ịnweta ya site na njikwa.
- Dejupụta ozi ihe omuma - aha zuru oke, ọnụ ọgụgụ ụlọ, nọmba ekwentị na ozi ndị ọzọ, ọ bụrụ na achọrọ.
- Mgbe nke a gasị, nye onye ọrụ ikike ikike ahụ site na itinye iwu
sudo adduser user1 sudo
. - Mepụta ndekọ dị iche maka onye ọrụ iji chekwaa faịlị ya
sudo mkdir / home / user1 / faịlụ
. - Na-esote, gafere na ebe nchekwa ụlọ gị site na
cd / ụlọ
ma n’ebe ahụ mee onye ọrụ ọhụrụ nwe onye nwe ndekọ gị site na iji kọmputa edegbanyere mkpọrọgwụ: mgbọrọgwụ / ụlọ / onye ọrụ1
. - Tinyegharịa ihe nkesa ahụ ma emechaa mgbanwe niile
sudo ọrụ vsftpd Malitegharịa ekwentị
. Naanị na nkesa Gentoo ka uru a na-ebugharị/etc/init.d/vsftpd Malitegharịa ekwentị
.
Ugbu a ị nwere ike ịrụ ọrụ niile dị mkpa na sava FTP n'aha onye ọrụ ọhụụ nwere ikike ịnweta ohere dị elu.
Kwụpụ 4: Hazie Firewall (Ubuntu naanị)
Ndị ọrụ nkesa ndị ọzọ nwere ike ịmịpụ nzọụkwụ a n'enweghị nsogbu, ebe ọ bụ na achọghịzi nhazi ọdụ ụgbọ mmiri n'ebe ọ bụla, naanị na Ubuntu. Site na ndabara, a na-ahazi Firewall n'ụzọ nke na ọ gaghị ekwe ka okporo ụzọ na-abata site na adres anyị chọrọ, yabụ ị ga-eji aka gị kwere ka ederede ya.
- Na njikwa, rụọ ọrụ nyere iwu otu otu
sudo ufw gbanyụọ
nasudo ufw nyeere
iji bido ịmalitegharị nchekwa ọkụ. - Tinye iwu inbound jiri
sudo ufw kwere 20 / tcp
nasudo ufw ekwe 21 / tcp
. - Lelee ma ọ bụrụ etinyere iwu nke etinyere site na ilele ọkwa ọkụ
ọnọdụ sudo ufw
.
Iche iche, Achọrọ m ịchọba ọtụtụ iwu bara uru:
/etc/init.d/vsftpd bido
ma obuọrụ vsftpd mmalite
- nyocha nke faịlụ nhazi;netstat -tanp | grepu LISTEN
- nkwenye nke nrụnye nke sava FTP;nwoke vsftpd
- kpọọ akwụkwọ ọrụ nke VSftpd iji chọta ozi dị mkpa gbasara arụmọrụ nke ike ahụ;malitegharịa ọrụ vsftpd
ma obu/etc/init.d/vsftpd Malitegharịa ekwentị
- nrụpụta sava.
Banyere ịnweta sava FTP na ịrụ ọrụ ọzọ na ya, kpọtụrụ ndị nnọchi anya gị maka inweta data a. Iji ha, ị nwere ike ịkọwa ozi gbasara aghụghọ nke ịmegharị ihe na ntanetị nke ụdị njehie dị iche iche.
N'isiokwu a bịara na njedebe. Taa anyị nyochara usoro maka ịwụnye sava VSftpd na-ejikọghị ya na Bochum ọ bụla, yabụ tụlee nke a mgbe ị na-agbaso ntuziaka anyị ma jiri ya tụnyere ụlọ ọrụ nke nwere sava sava gị. Na mgbakwunye, anyị na-akwado ka ịmara nke ọma na ihe ndị ọzọ, nke na-ekwu maka isiokwu nke ịwụnye ihe LAMP.
Hụ kwa: Wụnye LAMP Software Suite na Ubuntu