Forum Discussion
SharePoint Online Block upload of specific file types
Hi,
There's an option to block upload of specific file types to SPO under the Sync settings in SPO admin center. Which file extensions should I block? Any recommendations?
3 Replies
Tomas_S_ Check below Microsoft official documentation related to this topic and suggestions:
- Block syncing of specific file types
- Exclude specific kinds of files from being uploaded
- Set-SPOTenantSyncClientRestriction
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- Lalit MohanIron Contributor
Hi Tomas_S_
To block the upload of specific file types to SharePoint Online (SPO), you can follow these steps:
- Go to the SharePoint admin center.
- Click Settings.
- Click Sync.
- Select the Block upload of specific file types check box.
- Enter the file name extensions you want to block, separated by commas. For example, to block .exe, .mp3, and .zip files, you would enter exe,mp3,zip.
- Click Save.
Here are some file extensions that you may want to block:
- .exe: Executable files, such as programs and scripts.
- .bat: Batch files, which are used to run commands automatically.
- .vbs: Visual Basic scripts.
- .js: JavaScript files.
- .php: PHP files.
- .asp: ASP files.
- .aspx: ASP.NET files.
- .htaccess: Apache configuration files.
- .ini: Configuration files.
- .reg: Registry files.
- .msi: Windows Installer files.
You should also consider blocking any other file types that you do not want users to upload to SharePoint, such as music files, video files, or image files.
It is important to note that blocking file types can prevent users from uploading legitimate files. Therefore, you should only block file types that you are sure are malicious or pose a security risk.
Here are some additional recommendations for blocking file types in SharePoint:
- Use a combination of file extensions and file names to block specific files. For example, you could block all files with the .exe extension, as well as any files that contain the word "virus" in the file name.
- Use regular expressions to block more complex file patterns. For example, you could use a regular expression to block all files that end in .exe or .bat.
- Test the file blocking policy to make sure that it is working as expected. Try uploading different types of files to see if they are blocked.
I hope this helps! Let me know if you have any other questions.
- Tomas_S_Copper ContributorThank you!