Search code examples
apachehttp-status-code-403

403 error on .exe files apache


I have an apache webserver running on centos environment. There is a folder and in that there is a file which has an extension .exe lets name the file x.exe

when I try download this file using http://mysite.com/folder/x.exe I get a 403 error.

but if I add a gif to that folder it works http://mysite.com/folder/pic.gif

I dont have SSH access to this server but need to know some clue for why this is happenning, the file permissions are correct too.

any help is appreciated


Solution

  • well the answer was I had this in a folder where it forbids the exe

    Deny from all
    <FilesMatch "\.(html|HTML|htm|HTM|xhtml|XHTML|js|JS|css|CSS|bmp|BMP|png|PNG|gif|GIF|jpg|JPG|jpeg|JPEG|ico|ICO|pcx|PCX|tif|TIF|tiff|TIFF|au|AU|mid|MID|midi|MIDI|mpa|MPA|mp3|MP3|ogg|OGG|m4a|M4A|ra|RA|wma|WMA|wav|WAV|cda|CDA|avi|AVI|mpg|MPG|mpeg|MPEG|asf|ASF|wmv|WMV|m4v|M4V|mov|MOV|mkv|MKV|mp4|MP4|swf|SWF|flv|FLV|ram|RAM|rm|RM|doc|DOC|docx|DOCX|txt|TXT|rtf|RTF|xls|XLS|xlsx|XLSX|pages|PAGES|ppt|PPT|pptx|PPTX|pps|PPS|csv|CSV|cab|CAB|arj|ARJ|tar|TAR|zip|ZIP|zipx|ZIPX|sit|SIT|sitx|SITX|gz|GZ|tgz|TGZ|bz2|BZ2|ace|ACE|arc|ARC|pkg|PKG|dmg|DMG|hqx|HQX|jar|JAR|xml|XML|pdf|PDF)$">
        Allow from all
    </FilesMatch> 
    

    added exe there and worked fine,

    also a note, this was in a SilverStripe CMS powered site, and in the assets folder of SilverStripe