How does sharepoint identify a file type? For example, SharePoint will not allow you to upload executable files. Suppose if i rename a file extension from .exe to say, .doc, will the sharepoint allow the upload of this file?
3 Answers
Sharepoint recognize file types using their extensions.
If you are worried about users spreading malicious application/code in your Sharepoint Sites. I suggest you to take a look at Microsoft Forefront For Sharepoint.
You can modify the excluded extension list under Central Administration > Operations > Blocked File Types.

- 4,275
- 5
- 37
- 50
I believe there are two ways to identify file types. A naive approach is to check the extension. A more secure approach would be to examine the bits of the file and see what type the file is as many file types have a few bits (magic numbers) in the header that identify the format.
Depending on how SharePoint checks the file, that will determine how you can cheat the system.

- 114,398
- 98
- 311
- 431
-
That is my doubt actually. Does Sharepoint go by the extension? Or does it use the magic numbers? – ashwnacharya Oct 15 '08 at 18:26
SharePoint itself isn't very smart and relies on file extensions, so renaming files will get around it.
Forefront for SharePoint does do file inspection, so should be on your must-have list for anything external facing (and internal if you allow staff to install/run unknown software).
You can manage the blocked file extension list in the Central Admin in the Operations/Blocked File Types section. Note: this is per webapp!