I would like to make it so a web user can't open files with a particular extension. For example, within the mysite ibay, I don't want them to be able to open/download any files ending with .dat or .csv
I believe I can do this by adding the following <Files> block to the /etc/httpd/conf/conf.d:
<Directory /home/e-smith/files/ibays/mysite/html>
<Files ~ "\.(dat|csv)$">
order allow,deny
deny from all
</Files>
AllowOverride None
order deny,allow
deny from all
allow from all
</Directory>
Is this the best way? Would it be better/easier to make it global rather than just this one ibay? Is there a way to use AddType to globally make all .dat's and .csv's non-downloadable (i.e. is there any mime type that means deny access, such as AddType /None .dat .csv?)
Finally, what's the right way to make the change to SME so it survives updates, etc. I believe I need to make a custom template in /etc/e-smith/custom-templates/etc/httpd/conf/httpd.conf/ and rebuild the httpd.conf file with /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf , but I'm not sure what to name it or where specifically to put it so it ends up in the right place (within the <Directory> block for the correct ibay).
Thanks in advance for help and/or clarification!