Iimvume zeLinux zaBalawuli beeNkqubo kunye nabaPhuhlisi

Iimvume zeLinux zaBalawuli beeNkqubo kunye nabaPhuhlisi

Iimvume zeLinux zaBalawuli beeNkqubo kunye nabaPhuhlisi

Ukukhutshwa kweemvume kwiLinux kunye nokusetyenziswa kwayo ngokuchanekileyo ngomyalelo "chmod" yinto exhaphake kakhulu kwaye kuxoxwa ngayo kwi-SL Communities. Ngabasebenzisi abaPhucukileyo, amagcisa kunye naBalawuli beeSeva kunye neeNkqubo. Umzekelo kwiBhlog yethu sinee-2 ezilungileyo kakhulu malunga nayo, eziyi: Imvume kunye namalungelo kwiLinux (01/12) y Iimvume ezisisiseko kwi-GNU / Linux ene-chmod (08/16).

Kodwa amaxesha amaninzi Abaphuhlisi be-SW Ngoobani abenza iZicelo kunye neeNkqubo, uninzi lwazo ziiNkqubo kunye neeWebhusayithi, xa bebaphuhlisa, abaqhele ukuthathela ingqalelo ukuba zeziphi iimvume ezichanekileyo ekufuneka zenziwe kuboUkushiya umsebenzi phantse rhoqo kwicala leServer kunye neNkqubo yaBalawuli. Kolu papasho siza kuzama ukunika ulwazelelo oluncinci malunga nalo.

Iimvume zeLinux ze-DevOps / BDA: Intshayelelo

Intshayelelo

Umyalelo "chmod»Iluncedo kakhulu kwaye ibalulekile kusetyenziso oluphambili lweeNkqubo zokuSebenza ezisekwe kwiLinux. Nangona kunjalo, "i-chmod" enjalo ayisiyompahla emileyo, kodwa idityanisiwe kwiphakheji "engundoqo«. Iphakheji ye "coreutils" yiphakheji enikezela iNkqubo yokuSebenza ngezixhobo ezininzi ezisisiseko kulawulo lwefayile, iitoliki zomyalelo, kunye nokulungiswa kwamagama. Kwaye ngokubanzi, sele ifakwe ngokungagqibekanga kuninzi lweLinux Distros.

Ngokukodwa, le phakheji iqulethe, ukongeza kumyalelo "chmod", le miyalelo ilandelayo: arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp csplit cut cut dd df dir dircolors dirname du echo env expand expr factor false fmt fold group head head host id id install join link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nicec noh noh noh noh numfmt od paste pathchk pinky pr printenv printf ptx pwd readlink realpath rm rmdir runcon sha * sum seq shred sleep sort split stat stty sum sync tac tail tee test timeout touch tr true truncate tsort tty uname ungasebenzisi unq unlink abasebenzisi vdir wc whoami ewe.

Isishwankathelo, «chmod» Umyalelo uvumela umsebenzi obaluleke kakhulu wokulawula iimvume kwiifayile kunye neefolda kubo bonke abasebenzisi abalawulwa yiNkqubo yokuSebenza. Kungenxa yokuba iLinux njengeNkqubo yokuSebenza inabasebenzisi abaninzi, kwaye ke, kufuneka ibonelele ngendawo yokusebenza ngenkqubo yemvume yokulawula iseti yemisebenzi egunyazisiweyo kwiifayile nakwikhombisi, ebandakanya zonke izixhobo zenkqubo kunye nezixhobo.

Umxholo

Iimvume zeLinux ze-SW / BD: Umxholo 1

Sebenzisa kwabaphuhlisi be-SW

Umlawuli weServer kunye neeNkqubo (iSysadmin) xa uthatha isigqibo sokuba yeyiphi na imvume yokunika inqanaba X okanye iprofayile yomsebenzisi kwifayile ye-X okanye kwifolda, kufuneka azi ukuba loluphi uhlobo lomsebenzi okanye iinkqubo ekufuneka bezenzile. Kwimeko yeServer yeWebhu, aBasebenzisi banokuhlelwa kwiindidi ezi-2:

  1. Abasebenzisi boLawulo: Ngoobani abaneakhawunti yomsebenzisi kwiserver ukungena, banamalungelo athile, kwaye ngubani owenza uguquko oluthile (ikopi / ucime / uguqule) kwiNkqubo okanye kwiWebhusayithi efakwe kwi-SSH okanye kwi-SFTP, umzekelo.
  2. Abasebenzisi abangaBalawuli: Ukuba abanayo iakhawunti yomsebenzisi kwiseva, kuba ziindwendwe kuphela kwiSiza nakwiNkqubo yeWebhu. Kwaye ke, abanayo imvume yokufikelela kwiifayile kunye neefolda ngokuthe ngqo, kodwa kunokuba basebenzisane nabo, kwi-web interface yeSayithi okanye kwiNkqubo yeWebhu efakiwe.

Nangona kunjalo, xa iSysadmin ingafumani ngokwaneleyo okanye ngokwaneleyo Ulwazi, amaxwebhu, okanye inkxaso ngabaphuhlisi be-SW kubuchule, ukusebenza okanye ulwakhiwo lwefayile yeeSayithi zeWebhu kunye neeNkqubo eziza kufakwa ugqiba ukwenza ubuninzi obunokuthenjwa, obuhlala kule meko zihlala:

chmod 777 -R /var/www/sistema-web

Kwaye amaxesha amaninzi iphela ngo:

chown root:root -R /var/www/sistema-web

Iimvume zeLinux ze-SW / BD: Umxholo 2

Isilumkiso

Oku kuhlala kuyinto engalunganga, kodwa ihlala ithintela nayiphi na ingxaki yemvume kunye nokwenza kakubi iiSayithi zeWebhu kunye neeNkqubo. Isenzo esibi, ukusukela xa umyalelo chmod 777 usenziwa ngale ndlela kwifolda kunye neefayile zeSiza okanye iNkqubo yeWebhu, akukho kukhuseleko konke konke ngayo.

Ukwenza ukuba nawuphina umsebenzisi weSayithi okanye weNkqubo yeWebhu ekwi-Intanethi atshintshe okanye acime nayiphi na ifayile ngaphakathi kolwakhiwo lwefayile yeSiza okanye yeNkqubo yeWebhu ngaphakathi kweServer yeWebhu okanye ngaphaya kwayo, ngaphandle kwemiqobo emikhulu. Kuba kufuneka ikhunjulwe ukuba yi-Web Server esebenza egameni labasebenzisi abatyeleleyo, kwaye iyakwazi ukutshintsha iifayile ezifanayo ezenziwayo.

Kwaye ukuba umsebenzisi ungumhlaseli, kwaye ufumana ubungozi kwiSiza okanye kwiNkqubo yeWebhu, unokuyisebenzisa ngokulula ukuze ayonakalise, ayikhubaze.

Iimvume zeLinux ze-SW / BD: Umxholo 3

Iingcebiso

Ukuthintela ezi ntlobo zemilinganiselo, nokuba I-Sysadmin okanye i-SW Developer, kufuneka iqinisekise ukuba iifolda kunye neefayile zeeNkqubo ezahlukeneyo okanye iiWebhusayithi zineemvume ezichanekileyo eziyimfuneko kunye nabasebenzisi ukunqanda ukhuseleko kunye nemicimbi yabucala.

Kwinqanaba lemvume, le miyalelo mithathu ilandelayo inokwenziwa ukubuyisela iimvume kunye nabasebenzisi benkqubo efakiweyo okanye iWebhusayithi yesiqhelo.Ngamanye amagama, setha ixabiso lama-755 kuzo zonke izikhombisi kunye nama-644 kwiifayile.

Ngamaxesha onke ukhumbula ukubaphumeza ngaphakathi kweNkqubo okanye ifolda yeWebhusayithiUkusukela ukuba zenziwa kwifolda ephezulu (isikhombisi), ezinje, umzekelo, ingcambu yeseva, imiyalelo yomyalelo iya kuphinda iguqule zonke iimvume zeSeva, ishiye isenokungasebenzi.

Iimvume zeLinux ze-SW / BD: Umxholo 4

Imvume esetyenziswe kwifolda (Izalathiso)

U mzekelo

Izalathiso kunye neemvume zeefayile

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

y

chmod 777 -R .

o

chmod 777 -R /var/www/sistema-web

Kwimeko yokuba ungaphandle kwifolda (isikhombisi) seNkqubo okanye yeWebhusayithi.

Abasebenzisi benkqubo okanye beWebhusayithi

chown www-data:www-data -R .

o

chown www-data:www-data -R /var/www/sistema-web

Kwimeko yokuba ungaphandle kwifolda (isikhombisi) seNkqubo okanye yeWebhusayithi. Kwaye i-www-data yomsebenzisi isetyenziswa kuphela njengomzekelo, kuba yeyona nto isetyenzisiweyo okanye efanelekileyo ngokubhekisele ekusetyenzisweni kwe-Apache2.

Iimvume zeLinux ze-SW / BD: Umxholo 5

Imvume esetyenziswe kwiifayile (Iifayile)

Nje ukuba kwenziwe utshintsho kwimvume, singaqhubeka silungisa iimvume zezikhombisi kunye neefayile esifuna ukuba neemvume ezahlukeneyo ngesandla. Kwaye ukuba kunyanzelekile ukuba utshintshe nabanini bezinto eziyimfuneko. Ke ngoko, okwangoku, iSysadmin kunye nabaPhuhlisi be-SW kufuneka bavumelane malunga nokuba zeziphi iimvume eziyimfuneko kwifolda nganye kunye nakwifayile kwiNkqubo okanye kubume beWebhusayithi.

Iimvume zeLinux ze-SW / BD: Isiphelo

Isiphelo

Ukulawulwa kweemvume kwiifayile kunye neefolda zendlela yokusebenza yeLinux okanye yeUNIX, yenye yeenzuzo ezinkulu kunye nezibonelelo ezifanayo, kuba zivumela ulawulo olungcono, oluchanekileyo nolukhuselekileyo lwamanqanaba ahlukeneyo okufikelela, uhlelo kunye nokwenza iifayile kunye neefolda.

Kwaye ngakumbi xa kufikwa kwinqanaba leSeva zeWebhu, oko kukuthi, apho iiNkqubo okanye iiWebhusayithi zangaphakathi nezangaphandle zoMbutho zibanjwa, kuba kubaluleke kakhulu ukwazi ukuba zeziphi iimvume ekufuneka zinikezelwe kulawulo ngalunye okanye kwifayile, ukufezekisa olona bhalansi lubalaseleyo phakathi kwemfihlo, ukhuseleko kunye nokusebenza.


Umxholo wenqaku uyabambelela kwimigaqo yethu imigaqo yokuziphatha yokuhlela. Ukuxela impazamo cofa apha.

Izimvo ezi-2, shiya ezakho

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa. ezidingekayo ziphawulwe *

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.

  1.   Ipol28 sitsho

    Molo ekuseni unjani?
    Ndidlala kwi-linux, ndinesicelo esinokungenisa iifayile kuso, umsebenzisi alayishe i .zip enefolda eneefayile ze-xml, emva kokuvula iifayile ezifakwe kwindawo yogcino lwedatha. Kwiifestile andinangxaki, xa ndigqithisa isicelo kwi-linux ndiza kuphulukana neemvume, ngokomgaqo ukuvavanya yonke into endiyenzileyo abayithethileyo kweli nqaku kwaye ayifanelanga ukwenziwa haha ​​(kodwa ndiza kutshintsha kwakanye inokuqinisekisa yonke imisebenzi).
    Inyani yile yokuba iifayile zidityanisiwe kodwa ndiyabona ukuba zikhutshelwa kuphela ngeemvume zokufunda nokubhala kumnini, zifundelwe iqela lomnini ngaphandle kwemvume zabanye. Xa iifayile zezomsebenzisi osebenzisa usetyenziso. Ndiyaqonda ukuba ngokungabinayo imvume yokuphumeza, ayinako ukulandela ukuhamba kwesiqhelo kwenkqubo kwaye uqhubeke nokufaka i-xml kwiziko ledatha. Umbuzo wam uza phi, ndingazinika njani iimvume kwiifayile endingenazo kule nkqubo okwangoku? Kwifolda ekhutshelweyo (tmp) inazo zonke iimvume, isetyenziswa ngendlela ye-italic kodwa ixesha ngalinye iifayile zikhutshelwa ngaphakathi kwifolda baneemvume ezichaziweyo kuphela. Ngaba ikhona indlela yokuba iifayile ezibonakala kwifolda zinokushiyeka zenze neemvume?
    Ndiyathemba ukuba ndicacile, enkosi kakhulu kwangaphambili kunye nebhlog efanelekileyo

  2.   Ukufaka i-Linux Post sitsho

    Ndicinga ukuba incwadi eneenkcukacha / tmp okanye… / tmp ineemvume ezingama-755 kodwa nangona umsebenzisi ophethe isicelo ezifaka, uzishiya nezinye iimvume. Andingonjiniyela kodwa ndicinga ukuba kulwimi lwesicelo okanye enye inokubonisa indlela yesiqhelo esenza umyalelo womyalelo (bash) weemvume eziyimfuneko (chmod) kunye nomnini weefayile (chown). Ngaphandle koko, unokuqhuba iskripthi umzuzu ngamnye obalekayo.