Forum Discussion

Tomas_S_'s avatar
Tomas_S_
Copper Contributor
Aug 22, 2023

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

  • Lalit Mohan's avatar
    Lalit Mohan
    Iron Contributor

    Hi Tomas_S_

     

    To block the upload of specific file types to SharePoint Online (SPO), you can follow these steps:

    1. Go to the SharePoint admin center.
    2. Click Settings.
    3. Click Sync.
    4. Select the Block upload of specific file types check box.
    5. 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.
    6. 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.

     

Resources