Jump to content
php.lv forumi

Kaa Jaauzstaada Cmod?


Recommended Posts

Kurš no jums zin kaaa uzstādīt cmod

 

Lasiiju helpu bet nesanaak

 

<?php

// Read and write for owner, nothing for everybody else

chmod ("/somedir/somefile", 0600);

 

// Read and write for owner, read for everybody else

chmod ("/somedir/somefile", 0644);

 

// Everything for owner, read and execute for others

chmod ("/somedir/somefile", 0755);

 

// Everything for owner, read and execute for owner's group

chmod ("/somedir/somefile", 0750);

?>

 

 

vai

 

 

<?php

chmod ("/somedir/somefile", 755); // decimal; probably incorrect

chmod ("/somedir/somefile", "u+rwx,go+rx"); // string; incorrect

chmod ("/somedir/somefile", 0755); // octal; correct value of mode

?>

un abi raada kljuudu

Link to comment
Share on other sites

a tu paraadi kaadu klhuudu raada

un tad prasi ko noziimee taa klhuuda....

 

2ajaa piemeeraa takhs tev skaidri un gaishi uzraxtiits:

chmod ("/somedir/somefile", "u+rwx,go+rx"); // string; incorrect

 

un lai nomainiitu chmodu apachem jaabuut direktorijas iipashniekam (ownerim):

ieksh shell tas daraas taa: chown apaches_lietotaajs vajadziigaa_direktorija, bet to manupraat var izdariit tikai ROOT

 

protams pastaav veel iespeeja nomainiit chmodu, ja direktorijai ir chmods 777

Link to comment
Share on other sites

nu pirmais variants man vienmeer un visur ir straadaajis, taa kaa configa probleemaam tur nevaidzeetu buut... vieniigi ir taada lieta, ka *lietotaajam* kursh *izpilda* chmod(); saturoshu scriptu jaabuut arii attieciigaa faila vai direktorijas ownerim, ar domu iipashniekam... citaadi par permiiciju mainju var aizmirst

protams ka owneru mainju var izveikt tikai un vieniigi ar root tiesiibaam... :)

Link to comment
Share on other sites

×
×
  • Create New...