Zacznijmy kurs

Installed as an Apache module

Rozdział 25. Installed as an Apache module

When PHP is used as an Apache module it inherits Apache's user permissions (typically those of the "nobody" user). This has several impacts on security and authorization. For example, if you are using PHP to access a database, unless that database has built-in access control, you will have to make the database accessible to the "nobody" user. This means a malicious script could access and modify the database, even without a username and password. It's entirely possible that a web spider could stumble across a database administrator's web page, and drop all of your databases. You can protect against this with Apache authorization, or you can design your own access model using LDAP, .htaccess files, etc. and include that code as part of your PHP scripts.

Often, once security is established to the point where the PHP user (in this case, the apache user) has very little risk attached to it, it is discovered that PHP is now prevented from writing any files to user directories. Or perhaps it has been prevented from accessing or changing databases. It has equally been secured from writing good and bad files, or entering good and bad database transactions.

A frequent security mistake made at this point is to allow apache root permissions, or to escalate apache's abilities in some other way.

Escalating the Apache user's permissions to root is extremely dangerous and may compromise the entire system, so sudo'ing, chroot'ing, or otherwise running as root should not be considered by those who are not security professionals.

There are some simpler solutions. By using open_basedir you can control and restrict what directories are allowed to be used for PHP. You can also set up apache-only areas, to restrict all web based activity to non-user, or non-system, files.


mario download

WÄ…tki z forum o php

Najnowsze posty naszych userów

Samsung 640 GB 7200rpm SATA2 16MB CACHE (HD642JJ)
Witam
chce kupiæ nowy dodatkowy dysk

o taki
Samsung 640 GB 7200rpm SATA2 16MB CACHE (HD642JJ) co o nim s±dzicie? warto?

mam pytanie co mam jeszcze kupiæ oraz gdzie podpi±æ napiêcie

oto screen




pozdrawiam
Jak skróciæ utwór muzyczny np. z 3 min do 30s.
Witam,
S³uchaj±c muzykê w Windows Media Player zastanawiam sie jak skróciæ utwór mu¿yczny do potrzebnej mi d³ugo¶ci.
Mo¿e kto¶ podpowie jak to zrobiæ.
Pozdrawiam,
Kontroler obrotów
Mam ch³odzenie Pentagram Alpaya AM2 S775, do ch³odzenia by³ do³±czony kontroler obrotów, lecz ten nie chce dzia³aæ...
Gdy pod³±cze wentylator odrazu do p³yty to krêci siê, ale strasznie g³o¶no, a gdy pod³±cze do niego kontroler obrotów to wogóle siê nie krêci. Co mo¿e byæ nie tak?


Problemem bylo to, ze autor nie pozostawil mozliwosci zmian, wiec za pomoca programu PHP WebPage Editor zmienilem pewne potrzebne mi wartosci (ilosci wojsk - to akurat bylo latwe do znalezienia...), ale nie wiem, ktore wartosci odpowiadaja za czas wysylania tych jednostek wojska - chce zmienic z tych kilkunastu sekud na ok 1,5 godz... (to dziwne, bo nie jest to regularne - niektore ataki wychodza co 10 sek, niektore co 15 albo 20.