I'm installing MediaWiki as part of a static/PHP configuration and the documentation recommends that script execution privileges are revoked for the /images directory as users are able to upload files to that location. However, although I found a way to stop Python script execution (by adding I've tried various tricks from around the web without success:
And none of these have any effect: my test file of asked 20 Jan '13, 16:00 Kylotan |
Something like this in
If that doesn't work, then:
answered 20 Jan '13, 17:32 seanf Thank you, that first suggestion seems to work perfectly!
(21 Jan '13, 09:30)
Kylotan
|
You should be able to prevent execution by removing the execute bit from the directory and files in that directory. answered 20 Jan '13, 16:26 bmeyer71 ♦♦ If I do that, I can't navigate into the directory any more.
(20 Jan '13, 16:33)
Kylotan
Just remove execute for other. You may need to leave group with execute.
(20 Jan '13, 16:41)
bmeyer71 ♦♦
It still stops the web server from serving any of the files in there. I don't want to lock the whole directory - I just want to prevent script execution.
(20 Jan '13, 16:49)
Kylotan
Seems a bit odd. Maybe change the permissions for the directory back to 775 and try the .htaccess example in this link about 1/3 of the way down.
(20 Jan '13, 17:04)
bmeyer71 ♦♦
I already had the AddType line, which has no effect. Adding the ForceType block does nothing either, and nor does the AddHandler cgi-script idea.
(20 Jan '13, 17:24)
Kylotan
|