<div>Oops, I just missed the python part.</div>
<div>Does mod_python have similar options? Or how to stop other users to run python scripts in some directories?<br><br> </div>
<div><span class="gmail_quote">On 9/26/07, <b class="gmail_sendername">Miskell, Craig</b> <<a href="mailto:Craig.Miskell@agresearch.co.nz">Craig.Miskell@agresearch.co.nz</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>> Hello,<br>><br>> Is that possible to disable running of PHP on certain directories?<br>> I am running a server which provides personal homepage
<br>> service. However, not every user are familiar with security,<br>> some may upload some PHP scripts with bugs/holes. I do not<br>> want them to be executed on the server.<br>> I can enable the safe_mode, but I have some other PHP scripts
<br>> which need safe_mode to be disabled.<br>> Any suggestions?<br>Yes.  In you httpd.conf, you can include:<br><Directory "/var/www/sheep/html/tmp"><br>       php_flag engine off<br></Directory>
<br><br>Which disables php processing for the directory /var/www/sheep/html/tmp<br>.  You could probably just include<br>php_flag engine off<br>In an .htaccess in the directory in question, assuming you've set<br>AllowOverride to an appropriate value, and don't mind the slight
<br>performance hit of doing it that way.<br><br>We use the former method to protect areas where users are permitted to<br>upload files to (mediawiki in this case), stopping a user uploading<br>something malicious which would then execute in the context of the
<br>webserver<br><br>Craig Miskell<br>=======================================================================<br>Attention: The information contained in this message and/or attachments<br>from AgResearch Limited is intended only for the persons or entities
<br>to which it is addressed and may contain confidential and/or privileged<br>material. Any review, retransmission, dissemination or other use of, or<br>taking of any action in reliance upon, this information by persons or
<br>entities other than the intended recipients is prohibited by AgResearch<br>Limited. If you have received this message in error, please notify the<br>sender immediately.<br>=======================================================================
<br>_______________________________________________<br>CentOS mailing list<br><a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br><a href="http://lists.centos.org/mailman/listinfo/centos">http://lists.centos.org/mailman/listinfo/centos
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Zijing 15# 1404B Tsinghua Univ.<br>+86 -10 -51537235<br>Zig