Dlulisa amafayela usebenzisa i-SFTP namakheji ku-Debian naku-Ubuntu

Sawubona bangani! Namuhla ngikulethela enye indlela yokusebenzisa i-FTP Server ukudlulisa amafayela okuphephile. Kakade uzakwethu KZKG ^ Gaara uthumele eyodwa ngokususelwa kwiphakheji isiboshwa. Esizokuthuthukisa kususelwa kumaphakeji esesinawo okuningi endaweni yethu yokugcina izinto.
Sizobona:

  • Faka okudingekayo
  • Silungiselela kanjani i-Openssh-server?
  • Sakha kanjani abasebenzisi?
  • Siziguqula kanjani izinkomba zasekhaya ukwenza ikheji lisebenze?

Faka okudingekayo
Imvamisa sidinga amafayela azokopishwa kusuka kumakhompyutha akude aye emshinini wethu. Abaningi bangibuze ngakho. Ngifaka i-FTP? Ngiyifaka kanjani i-SAMBA? Hhayi-ke, ake sisuke kokulula siye enkingeni. Zisuka nje, kungani sizenza inkimbinkimbi uma sine- I-OpenSSH-Server ifakiwe?. Futhi uma singenayo, ngomyalo olula:

ukufaneleka ukufaka i-openssh-server

Manje sesinayo! Futhi-ke sizokwazi ukudlulisa amafayela ngokuphepha ngephrothokholi ye-SFTP (Secure File Transfer Protocol), esebenzisa i-SSH (Secure Shell) ukubethela.

Ngokuzenzakalelayo, abasebenzisi abanemvume yokuqala iseshini esikude nge umsebenzisi we-ssh @ iqembu lami, bazokwazi ukubona cishe wonke amafayela agcinwe kusistimu yethu, okungenzeka ukuthi asikuthandi, noma ukuthi ngenxa yezizathu zokuphepha akufanele sikuvumele.

Lo mbhalo uzosisiza ukumisa i- I-OpenSSH-Server ukuze abasebenzisi esibafunayo bavinjelwe enkombeni yabo yangasese / ikhaya / umsebenzisi. Siyakucacisa ukuthi, Ngale ndlela kumenyezelwe abasebenzisi ngeke bakwazi ukuqala iseshini esikude nge-ssh console noma nge-PuTTy. Bazokwazi kuphela ukudlulisa amafayela baye noma basuke enkombeni yabo yomuntu siqu kukhompyutha yethu noma kuseva.

Indlela echazwe lapha isebenza kwizinguqulo ze-Debian 5 (Lenny) noma ngaphezulu, naku-Ubuntu 9.04 noma ngaphezulu. Uhlobo lwephakethe le-SSH le-Hardy noma i-Ubuntu 8.04 selephuze kakhulu futhi alusekeli ukucushwa okuchazwe ngezansi.

Silungiselela kanjani i-Openssh-server?
Njengomsebenzisi izimpande sihlela ifayela / njll / ssh / sshd_config nganoma yisiphi isihleli sombhalo esilula. Sincoma ukusetshenziswa kwe nano kumodi ye-console.

nano / njll / ssh / sshd_config

Sifuna umugqa olandelayo ubekhona:

Subsystem sftp

KuLenny naseSqueeze kukhona:

Subsystem sftp / usr / lib / openssh / sftp-server

Uma kwenzeka ingekho, sengeza ekugcineni kwefayela:

I-Subsystem sftp yangaphakathi-sftp

Siyaqhubeka nokuhlelwa kwefayela sshd_config futhi sengeza ekugcineni:

Qondanisa iqembu le-sftp ChrootDirectory% h X11 Ukudlulisa akukho i-AllowTcpForwarding no ForceCommand yangaphakathi-sftp

Songa izinguquko bese siqala kabusha insiza:

/etc/init.d/ssh qala kabusha

Sakha kanjani abasebenzisi?
Okokuqala sakha i- «iqembu»Lokho esikumemezelayo ku- sshd_config. Qaphela igama esilikhethe phambilini, ngeke kube ukuthi selivele likhona futhi liyiqembu leSistimu. Uma singafuni ukukhawulela abasebenzisi abakhona ohlelweni lwethu, kufanele sakhe abasebenzisi abasha ukuze bakwazi ukudlulisa amafayela. Ukuze ikheji lisebenze, nathi kufanele sibenze, babe ngamalungu eqembu okukhulunywa ngalo.

i-addgroup group-sftp adduser user1 adduser user2 [----] usermod -G group-sftp user1 usermod -G group-sftp user2 [

Ukuhlola ukwenziwa kweqembu nabasebenzisi, singenza:

okuncane / njll / iphasiwedi ngaphansi / njll / iqembu ls -l / home

Futhi abasebenzisi kufanele bavele umsebenzisi1 y umsebenzisi2kanye namaqembu iqembu-sftp nalabo abahambisana nabasebenzisi abadaliwe. Futhi, lapho ufaka kuhlu lwemibhalo / ekhaya, izinkomba zasekhaya zomsebenzisi ngamunye ezidaliwe zizovela.

Siziguqula kanjani izinkomba zasekhaya ukwenza ikheji lisebenze kahle?
Kufanele sikhuphule ukuphepha kwamafolda womsebenzisi ngamunye owenziwe ukuze angakwazi ukudala amafolda angeziwe ngaphansi kwesikhombimsebenzisi sabo, nangezimvume zokubhala lapho sifuna khona (hhayi lapho befuna khona) 🙂:

izimpande ezikhethiwe: impande / ikhaya / umsebenzisi1 / ikhaya / umsebenzisi2 chmod 755 / ikhaya / umsebenzisi1 / ikhaya / umsebenzisi2 cd / ikhaya / umsebenzisi1 mkdir amadokhumenti html_public chown user1: user1 * cd / home / user2 mkdir imibhalo html_public chown user2: user2 *

Abasebenzisi beqembu iqembu-sftp, kusukela manje bazokwazi ukungena ngemvume ngamagama abo namaphasiwedi nge-SFTP kuphela, futhi bazokwazi ukudlulisa amafayela baye nasezinkombeni ezibhalwe ngezansi kwefolda yabo futhi ezakhiwe yithi, kepha ngeke sikwazi ukubona lonke uhlelo lwethu lwamafayela.

Ngokudluliswa kwamafayela namafolda, singasebenzisa iNautilus, iKonqueror, iWinSCP, iFayileZilla, nezinye ezisekela umthetho olandelwayo we-SFTP. Endabeni yeKonqueror, kufanele sisebenzise inhlanzi: // umsebenzisi @ remotecomputer.

Siyethemba ukuthi le ndatshana izosisiza kakhulu!
Kuze kube yi-adventure elandelayo, bangani!

umabhebhana


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Amazwana ayi-12, shiya okwakho

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe. Ezidingekayo ibhalwe nge *

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.

  1.   hexborg kusho

    I-athikili enhle. Indlela ephephe kakhulu yokwabelana ngamafayela. Ngiyabonga kakhulu ngencazelo. 🙂

  2.   blitzkrieg kusho

    Excelente

  3.   Lolo kusho

    Futhi akukukhululekile ngokwengeziwe ukusebenzisa ama-sshfs?

    Eqenjini lethu ifolda ekude izovela njengefolda eyodwa enezici ezifanayo.

  4.   UJacobo Hidalgo kusho

    Sawubona Federico, njenge-athikili enhle njalo. Ngijabule kakhulu ukukwazi ukufunda okuthunyelwe kwakho kwi-Intanethi manje.
    Ukwanga,
    Njengo

    1.    isihlibhi kusho

      Kuthiwani ngoJacobo, akekho uFederico angavumelani ngqo. Hheyi lapho ungabuyanga ubuntu upenda okuluhlaza komuntu nokuvula okugcwele. Ukwanga. 😉

  5.   KZKG ^ Gaara kusho

    Wenza iminikelo emihle kakhulu, qhubeka njalo 😀

    1.    frederico kusho

      Ngiyabonga i-KZKG eyinkulungwane ^ Gaara, futhi Siyabonga kuwo WONKE UMUNTU ngempendulo yakho

  6.   jaenense kusho

    Ngabe umsebenzisi angavalelwa kufolda engeyona i- / home / user /… ..?

    Engifuna ukukwenza ukuvalela umsebenzisi kufolda / yemidiya / i-hdd / ifolda…
    Ngidinga ukukwenza ngale ndlela ngoba iseva iyi-Raspberry Pi eneRaspbian, futhi inefolda / home /… / ekhadini le-sd, ebelingagcwaliswa ngokushesha.

    Ngizamile ngezindlela eziningana futhi umphumela weklayenti uhlala «Ipayipi eliphukile», futhi umphumela kuseva ebulalayo: ubunikazi obubi noma izindlela zento yomkhombandlela we-chroot «/ media / HDD /»

    Ngibonga kakhulu kubo bonke

    1.    frederico kusho

      Ngicabanga ukuthi kuzofanele utshele uhlelo ukuthi ifolda yasekhaya yalowo msebenzisi i- / home / HDD, inqobo nje uma leyo ngxenye inefomethi ye-linux yendabuko, okungukuthi, ext4; ext3; njll. Isibonelo, uma umsebenzisi eyi-jae -fushane- kufanele wenze into enjengale:

      : ~ # usermod - hamba-ekhaya –ikhaya / ikhaya / i-HDD jae

      Futhi bona indoda usermod. Jabulela

  7.   irving hernandez kusho

    Nginenkinga, noma nginensizakalo e-amazon nomngane womphakathi futhi kufanele ngingene nge-sftp ukubeka noma ukususa amafayela.
    Sengikwenzile phambilini konke kuhamba kahle kodwa namhlanje wenze okuthile kimi obekungenzekanga kimi
    Ngaphakathi kwe-ami kukhona uchungechunge lwamafolda kanti elinye lawo ingosi ye-inthanethi ebanjiwe (ikhasi labasebenzisi bami) kuvela ukuthi lapho ngenza ukukhushulwa nokwazisa abasebenzisi bami futhi ngihlala ngilungisa futhi ngiwafaka nge-sftp (nge-winscp izimvume zezimpande nokudlula kwezimpande
    Nginikeze i-chmod 777 yezimvume zokubhala futhi konke kuhambe kahle
    kepha namhlanje lapho ngivuselela iwebhu futhi ngifaka i-index.html namanye amafayela inginike amagama kepha ingishiye ngingenawo amabhayithi okusho ukuthi zero (blank) manje awuboni lutho kuwebhu yami
    Ngisivalile isikhathi futhi ngangena futhi, nganika izimvume futhi, ngishintsha umsebenzisi, ngivuselela, zama ukufaka amanye amafayela, ngikhiphe amasha futhi ihlala yenza okufanayo
    inginikeza amafayela kepha ayinayo idatha
    Ngabe kukhona ongangisiza ???
    Ngingazithokozela kakhulu izimpendulo zakho
    okokuqala, Ngiyabonga
    i-atte
    Ilayisense u-Irving Hernandez

  8.   FCC kusho

    Sawubona ukuthi ungayisebenzisa kanjani i-filezilla, sengivele ngiyibonile ngezindlela eziningana futhi angikakwazi ukuxhuma.
    Akulungile.

  9.   Pedro kusho

    Sawubona,

    Yenza inqubo futhi okugcinwe esibayeni kusebenza kahle, kepha lapho uzama ukubhala kufolda «imibhalo» noma «html_publico» kunginikeza ukufinyelela okwenqatshiwe. Inezimvume ezishiwo futhi akukho okukuvumelayo.

    i-drwxr-xr-x. 2 user1 user1 4096 Mar 11 13:16 amadokhumenti
    i-drwxr-xr-x. 2 user2 user2 4096 Mar 11 13:16 html_publico

    Umphumela uba ukwenqatshwa kokufinyelela lapho uzama ukubhala kunoma iyiphi ifolda. Noma kunjalo, ukwenza i-get kuyakuvumela.

    Ngiyethemba ungangisiza ngokushesha okukhulu.

    Ukubingelela