Preventing scripts being executed from writeable directories

This is a discussion on Preventing scripts being executed from writeable directories within the Linux Web Servers forums, part of the Web Server and Related Forums category; Is it possible with Apache to prevent (for example) mod_php parsing any scripts which reside in writeable directories? I'm ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-03-2007
moresolutions@gmail.com
 
Posts: n/a
Default Preventing scripts being executed from writeable directories

Is it possible with Apache to prevent (for example) mod_php parsing
any scripts which reside in writeable directories?

I'm dealing with the aftermath of an exploit which made use of a code
flaw to upload a script to a writeable directory (intended for
uploading images), then running that script through its URL. The
ability of that exploit to cause any damage would have been reduced
if .php files were only parsed from read-only directories.

  #2 (permalink)  
Old 10-05-2007
C.
 
Posts: n/a
Default Re: Preventing scripts being executed from writeable directories

On 3 Oct, 18:11, moresoluti...@gmail.com wrote:
> Is it possible with Apache to prevent (for example) mod_php parsing
> any scripts which reside in writeable directories?
>
> I'm dealing with the aftermath of an exploit which made use of a code
> flaw to upload a script to a writeable directory (intended for
> uploading images), then running that script through its URL. The
> ability of that exploit to cause any damage would have been reduced
> if .php files were only parsed from read-only directories.


Yes - switch off the handler with a <Directory> or <location> tag in
your Apache config or use a .htaccess file in the directory:

AddType text/plain .php .phtml

C.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:07 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0