-2
I have an apache webserver running as user apache, and the application I'm hosting (Wordpress) requires certain folders with write permissions by the user apache, I want to limit the write permissions (creation of files) to only .png, .gif, .jpg and .pdf files, but deny .php file creation. Is it possible to do this from apache or linux?
Thank you for your help.
[EDIT]
As per Michael Kjörling suggestion, I added the following to a .htaccess file inside every upload directory:
<FilesMatch "\.php$">
Order Allow,Deny
Deny from all
</FilesMatch>
Ahhh....have you looked at putting this into directory .htaccess files for apache? – mdpc – 2015-03-21T21:17:00.023
Hi, Do you mean Allow and Deny directives in apache? I guess that are for host restrictions only. – Sven Knowles – 2015-03-21T21:28:59.523
No they are for user permissions too! I am assumming you have enabled some type of apache user authentication! – mdpc – 2015-03-21T21:30:09.267
No user authentication is in use, the web pages have public access – Sven Knowles – 2015-03-21T21:51:33.727