Yuav ua li cas rau nruab thiab teeb tsa ib tus neeg rau zaub mov FTP nrog Pure-FTPd + virtual cov neeg siv

Kuv yog ib tus uas nyiam tawm tswv yim tshiab thiab kawm yam tshiab, tsis ntev dhau los kuv tau nruab thiab teeb tsa ib lub server FTP thiab kuv txiav txim siab los ua nws txawv dua li kuv ib txwm ua.

Hauv qhov no kuv xaiv rau kev pab cuam FTP nrog cov neeg siv khoom virtual, cov neeg siv yuav muab khaws cia rau hauv cov ntawv hloov (cov siv, tus password, chaw, thiab lwm yam), tag nrho nrog Ntshiab si FTPd.

Ntawm no kuv yuav qhia koj yuav tsum ua nws ... zoo, cia peb pib 😉

Ua ntej tshaj plaws, qhia meej tias cov lus txib hauv qhov kev qhia no yog npaj rau qhov cuam tshuam xws li Debian lossis ua raws li lawv, txawm li cas los xij yog ib tug neeg siv lwm tus distro ntawm lawv cov server lawv yuav tsum nruab tib cov pob thiab siv cov chaw teeb tsa hauv qab no, qhov tsuas yog qhov uas yuav tsum tau hloov pauv yog qhov install command.

Txhua lo lus txib uas lawv yuav nyeem yuav raug tua ua cov hauv paus, yog tias koj xav tau, koj tuaj yeem sau "sudo" rau txhua kab.

1. Ua ntej peb yuav tsum nruab ntshiab FTPd:

apt-get install pure-ftpd

Cov zis yuav xaus tej yam zoo li no:

txhim kho-ntshiab-ftpd

2. Cov kev pabcuam twb qhib lawm, tab sis nws tsis muaj txiaj ntsig yog tias peb tsis tau teeb tsa nws kom raug, cia muab cov ntaub ntawv teeb tsa dav tab sis yuav luag tus qauv, nws muaj qhov ib txwm, tsim kom muaj cov neeg siv tsis qhia npe tsis raug tso cai, thiab lwm yam.

cd /etc/pure-ftpd/ && wget http://ftp.desdelinux.net/pure-ftpd.conf

3. Zoo, piv txwv li peb cov FTP nplaub tshev yog / var / www / ftp / thiab peb xav tsim kom tus neeg siv uas tuaj yeem upload cov ntaub ntawv rau / / var / www / ftp / sysadmin / nplaub tshev, cia muab cov hauv qab no tso rau hauv lub davhlau ya nyob twg:

pure-pw useradd sysadmin -u 2001 -g 2001 -d /var/www/ftp/sysadmin/

Qhov no txhais tau tias hauv qab no:

pure-pw: Command siv los tswj cov neeg siv ntshiab-FTPd
useradd: Peb qhia tias peb yuav ntxiv tus neeg siv khoom
sysadmin: Tus neeg siv Kuv xav tsim
-u 2001: Tus neeg siv ntawm tus neeg siv ntawd
-g 2001: GroupID ntawm tus neeg siv ntawd
-d / var / www / ftp / sysadmin /: Cov nplaub tshev uas yuav ua rau lub tsev ntawm tus neeg siv ntawd, uas yog, qhov uas lawv yuav upload khoom

Thaum koj nkag rau kab kab dhau los, nws yuav nug koj tus password ntawm tus neeg siv ntawd.

Lawv yuav tsum tau tsim yav tas los tsim sysadmin nplaub tshev sab hauv / var / www / ftp /

4. Tam sim no lawv yuav tsum ua tshiab ntawm tus neeg siv cov ntaub ntawv, rau qhov no peb nkag mus rau nplaub tshev / etc / pure-ftpd / (cd / etc / pure-ftpd) thiab muab tso rau hauv lub davhlau ya nyob twg:

pure-pw mkdb

5. Tam sim no peb yuav tsum pib Pure-FTPd tab sis taw qhia tias peb yuav siv cov neeg siv virtual ua ntaub ntawv, ua ntej cia tso tseg qhov kev pabcuam:

/etc/init.d/pure-ftpd stop

Tom qab ntawd peb yuav xyuas kom meej tias nws yuav tsis pib los ntawm lub neej ntawd nquag:

chmod -x /etc/init.d/pure-ftpd

Thiab tam sim no peb pib qhov kev pabcuam peb txoj hauv kev:

/usr/sbin/pure-ftpd -j -lpuredb:/etc/pure-ftpd/pureftpd.pdb

6. Yog tias lawv sim siv ib daim ntawv thov zoo li Filezilla lawv yuav pom tias lawv tuaj yeem txuas yam tsis muaj teeb meem nrog tus neeg siv tsim, txawm li cas los xij lawv yuav tsis tuaj yeem luam txhua yam lossis tsim cov ntawv sau, qhov no yog vim tias / var / www / ftp / sysadmin / nplaub tshev (tus neeg siv lub tsev as per tus piv txwv) tsis muaj qhov tso cai tsim nyog, nws yuav tas nrog ib:

chown -R 2001:2001 /var/www/ftp/sysadmin/

Nco ntsoov, Uid thiab Gid 2001 yog ib qho ntawm cov neeg siv uas peb tsim, peb tsim nws nrog cov lus txib hauv kauj ruam dhau los 3 😉

7. Txhawm rau nres qhov kev pabcuam, tsuas yog nias [Ctrl] + [C] hauv tib lub davhlau ya nyob twg lossis, hauv lwm lub davhlau ya nyob twg, ua a:

killall pure-ftpd

Tam sim no peb yuav qhia tias qhov kev pabcuam yuav pib ua haujlwm nrog lub kaw lus thaum lub server pib, rau qhov no peb hloov kho cov ntaub ntawv /etc/rc.local thiab ua ntej cov kab kawg uas hais tias "tawm 0" peb tso cov lus txib uas peb pib ua haujlwm rau FTP:

/usr/sbin/pure-ftpd -j -lpuredb:/etc/pure-ftpd/pureftpd.pdb

Hauv lwm lo lus, nws yuav zoo li no:

rc-zos-ntshiab-ftpd

Koj tuaj yeem hloov kho cov ntaub ntawv nrog nano, vi lossis koj nyiam tus kws sau ntawv, lossis yog tias koj nyiam, theej thiab luam tawm cov lus txib no uas yuav ua rau koj cov haujlwm yooj yim dua:

perl -pi -e "s[exit 0][/usr/sbin/pure-ftpd -j -lpuredb:/etc/pure-ftpd/pureftpd.pdb]g" /etc/rc.local && echo "exit 0" >> /etc/rc.local

... yog muaj ... raws li koj nyeem, «yooj yim», nws yog cov lus txib dav dav yog, tab sis nws tsuas yog los hloov cov ntawv nyeem nrog perl thiab tsis muaj qhov phom sij cho

8. Thaum no ua tiav lawm, rov pib lub server thiab koj yuav pom tias qhov kev pabcuam ntshiab-ftpd tau pib thiab npaj ua haujlwm 😀

Yuav rho tawm cov neeg siv li cas?

Raws li kuv tau hais rau koj ua ntej, lo lus txib huv-pw yog dab tsi peb yuav tsum tswj cov neeg siv, kom rho tawm tus neeg siv (piv txwv, sysadmin) cia muab cov hauv qab no:

cd /etc/pure-ftpd/
pure-pw userdel sysadmin
pure-pw mkdb

Nco ntsoov tias thaum twg koj hloov pauv rau ib tus neeg siv, koj yuav tsum tsim dua tshiab ntawm virtual cov ntaub ntawv ntawm cov neeg siv, nws nyob rau hauv / etc / pure-ftpd / thiab nws yog tsim / hloov tshiab nrog ntshiab-pw mkdb

Xijpeem cov phooj ywg Kuv xav tias tsis muaj ntau yam ntxiv los ntxiv, caw koj nyeem kev pabcuam ntawm lub txaj-ntshiab vim tias nws tso cai rau peb ntau dua li cov uas kuv tau qhia koj ntawm no (qhov no tsuas yog qhia luv luv thiab yuav luag kev nyeem).

Ib lossis ob xyoos dhau los kuv yog ib tus tau txuas txhua yam rau OpenLDAP lossis MySQL, tab sis raws li lub sijhawm los ntawm kuv pom tau hais tias muaj ntau txoj kev sib txuas rau cov chaw khaws ntaub ntawv uas yog cov servers xws li tsim kom muaj kev noj haus uas ntau lub sijhawm peb tsis tuaj yeem them, Vim li no, kev siv cov kev hloov pauv uas siv tau tag nrho xws li siv cov ntawv sau rau hauv daim ntawv thov ntawm nws tus kheej cov ntaub ntawv, xws li Pure-FTPd .pdb 🙂

Txhua yam uas ua xyem xyav lossis nug Kuv yuav sim pab tau ntau li kuv muaj peev xwm.

Txais tos thiab… zoo siab nyiag nkas!


Cov ntsiab lus ntawm tsab xov xwm ua raws li peb cov ntsiab cai ntawm kev tswj hwm kev ncaj nceesCov. Tshaj tawm ib qho yuam kev nyem no.

13 lus, tawm koj li

Tso koj saib

Koj email chaw nyob yuav tsis tsum luam tawm. Yuav tsum tau teb cov cim nrog *

*

*

  1. Lub luag haujlwm rau cov ntaub ntawv: Miguel Ángel Gatón
  2. Lub hom phiaj ntawm cov ntaub ntawv: Tswj SPAM, kev tswj xyuas tawm tswv yim.
  3. Sau raws cai: Koj kev tso cai
  4. Kev sib txuas lus ntawm cov ntaub ntawv: Cov ntaub ntawv yuav tsis raug xa mus rau lwm tus neeg thib peb tsuas yog los ntawm kev txiav txim siab raug cai.
  5. Cov ntaub ntawv khaws cia: Cov Ntaub Ntawv khaws tseg los ntawm Occentus Networks (EU)
  6. Txoj Cai: Txhua lub sijhawm koj tuaj yeem txwv, rov qab thiab tshem tawm koj cov ntaub ntawv.

  1.   elav ua said

    Tias.. Cov ntaub ntawv ua txhaum cai of

    1.    KZKG ^ Gaara said

      Thiab kuv twb tau sau cov ncej ntawm yuav ua li cas rau nruab Nginx + MySQL + Spawn_FastCGI zoo li kuv tau ua hauv Kev Ncaj Ncees, thiab ua tsaug uas blog ua haujlwm tau zoo heev :)

      Kuv vam tias yuav npaj nws rau tag kis lossis hnub tom qab tag kis.

  2.   Rodolfo said

    Ncej zoo; Nws lom zem, tsis ntev los no kuv tau tawm tsam muab kuv lub ftp server Kuv tsis tuaj yeem nrog vsftpd thiab kuv tau mus rau qhov ntshiab-ftpd thiab yog tias kuv xav tias kuv xav tau nws yog los tso ib qho piv txwv ntawm qhov tseeb conf cov ntaub ntawv yog qhov zoo heev, tab sis tsawg kawg cov hauv paus Cov. Kev ntsuas kev zais, lossis tsawg kawg yog qhov forwading chaw nres nkoj hauv case router siv.
    Los ntawm txoj kev nrog cov lus txib no ntshiab-ftpwho qhia rau koj paub leej twg txuas nrog lub server, thiab yog tias muaj qee yam rub tawm;).
    Thiab raws li koj, tso ib qho chaw khaws ntaub ntawv rau txuas rau cov neeg rau zaub mov tsis tsim nyog.

    1.    KZKG ^ Gaara said

      Tsaug rau saib 🙂

      Yog lawm, Kuv yuav tsum piav txog ntau yam (txhua qhov tseeb) hauv kev teeb tsa, nws yog qhov kuv xav tias ib tus neeg paub tswj hwm server, leej twg xav nruab qhov kev pabcuam FTP, tias ib tus neeg yuav tsis muaj teeb meem loj los nyeem cov lus ntawm cov ntawv conf ^ - ^

      Kev txais tos thiab ntxiv, ua tsaug rau cov lus pom

  3.   Tahuri said

    Nyob zoo Zoo tshaj tawm, Kuv siv (lossis tsawg kawg rau tam sim no) vsftpd tab sis kuv muaj qee qhov teeb meem nrog nws, thiab kuv xav pom yog tias kuv tau tshwm sim rau qhov no, koj puas muaj qhov url lossis doc kom pom tias nws txoj kev teeb tsa zoo li cas?

    Ua Tsaug Ntau};)

    1.    KZKG ^ Gaara said

      Koj tuaj yeem pom tus txheej txheem ntawm no: http://ftp.desdelinux.net/pure-ftpd.conf
      Muaj lus nug lossis yog tias koj xav tau qee yam qhib xov hauv xov xwm hauv kev sib tham uas peb yuav zoo siab pab koj 🙂

  4.   Atheyus said

    Zoo heev 😀

    Tsuas yog ib qho me me, qhov perl hais kom ploj ntawm lub cim ^, yog li nws tsis hloov lwm qhov tawm 0 uas yog hauv cov lus:

    perl -pi -e "s[^exit 0][/usr/sbin/pure-ftpd -j -lpuredb:/etc/pure-ftpd/pureftpd.pdb]g" rc.local && echo "exit 0" >> rc.local

    regards

  5.   Omar said

    Zoo heev, Kuv tsuas muaj lus nug, Kuv tuaj yeem tsim tus neeg siv nyeem nkaus xwb li cas? Kuv siv Centos 6.5, pureftpd, ispconfig thiab hom duab.

    Kuv siv ispconfig tsuas yog rau ftp

    Kev txais tos thiab ua tsaug

  6.   lub hli ntuj said

    Txoj kev no ntawm kev txhim kho pureftp yog ASCO 🙂 koj tawm ntawm cov kev pabcuam ua haujlwm hauv paus, tsim tus neeg siv virtual thiab tom qab ntawd hloov cov kev tso cai ntawm lub filesystem, thiab ufff ntev thiab lwm yam Txoj kev pob tau teeb tsa tau npaj siv, tsis tas yuav tsum ua txhua yam ntawm cov theem no

    1.    elav ua said

      Koj raug caw mus tshaj tawm cov lus qhia "qias neeg" tsawg dua .. 😉

    2.    sedlav said

      Koj hais dabtsi? Muab tus neeg rau zaub mov ftp los mloog ntawm qhov chaw nres nkoj> 1024? Yog tias tus neeg rau zaub mov ftp tau mloog ntawm nws qhov chaw nres nkoj txheem: 22 nws yuav tsum khiav raws li hauv paus tshwj tsis yog koj hloov kho lub peev xwm, yog tias qhov koj xav tau yog kev txhim kho kev ruaj ntseg siv MAC lub moj khaum nrog SELinux lwm qhov txawv yuav raug kaw / chroot tus neeg rau zaub mov ftp.

  7.   Ll Tailor said

    Qhov txuas rau qhov ntshiab-ftpd.conf tau nqis los yog tsis nyob. Koj puas tuaj yeem muab nws rov qab?
    Tsaug

  8.   Attachments said

    2 xyoos tom qab ntawv txuas rau cov ntawv ntshiab-ftpd.conf tseem poob qis 🙁