Blog | G5 Cyber Security

Windows Folder Security: A Practical Guide

TL;DR

This guide shows you how to properly secure folders on a Windows computer using NTFS permissions and best practices. It covers setting basic permissions, checking effective access, and avoiding common pitfalls.

1. Understanding NTFS Permissions

Windows uses NTFS (New Technology File System) for folder security. Permissions control who can do what with your folders and files. Key permissions include:

Permissions are applied to users and groups.

2. Setting Basic Folder Permissions

  1. Right-click the folder you want to secure.
  2. Select Properties.
  3. Go to the Security tab.
  4. Click Edit… to change permissions.
  5. Click Add… to add a user or group (e.g., your account, a specific team). Type in the name and click ‘Check Names’ then OK.
  6. Select the added user/group from the list.
  7. In the ‘Permissions for…’ section, check or uncheck boxes to grant or deny permissions. Start with the least privilege necessary – don’t give Full Control unless absolutely required. For example, if someone only needs to view files, grant them Read & Execute and List Folder Contents.
  8. Click Apply then OK on all open windows.

3. Checking Effective Access

It’s crucial to verify that permissions are working as expected.

  1. Right-click the folder and select Properties.
  2. Go to the Security tab.
  3. Click Advanced.
  4. Select the user or group you want to test.
  5. Click Effective Access.
  6. Click View Effective Access…
  7. Check the results – this shows exactly what that user/group can do with the folder, taking into account all inherited permissions and group memberships.

4. Dealing with Inheritance

Permissions are often inherited from parent folders. This is usually desirable, but sometimes you need to break inheritance.

  1. Right-click the folder and select Properties.
  2. Go to the Security tab.
  3. Click Advanced.
  4. Click Disable Inheritance. You’ll be prompted with options:
  • Choose the appropriate option and click Apply.
  • After disabling inheritance, you can then set specific permissions for the folder.

    5. Avoiding Common Mistakes

    6. Command Line Example

    You can also manage permissions using the command line.

    icacls "C:MyFolder" /grant username:(OI)(CI)F

    This grants ‘username’ Full Control (F) to the folder and all subfolders/files (OI = Object Inherit, CI = Container Inherit). Replace “C:MyFolder” with your actual folder path.

    Exit mobile version