Before you start
- You need to be signed in with an administrator account.
- The folder must be on an NTFS drive. Almost every Windows system drive is NTFS. USB sticks formatted as FAT32 or exFAT have no Security tab, so this method does not work on them.
- The steps are the same in Windows 11 and Windows 10, in both Home and Pro editions.
- Know the exact Windows user name you want to restrict, for example
analyst1orOFFICE\analyst1on a domain.
Method 1: Deny delete permission in File Explorer
This is the easiest method for one folder on one computer.
- Open File Explorer, right-click the folder you want to protect and choose Properties.
- Open the Security tab and click Advanced.
- In Advanced Security Settings, click Add.
- Click Select a principal, type the user name, click Check Names, then OK.
- Change Type from Allow to Deny.
- Set Applies to to This folder, subfolders and files.
- Click Show advanced permissions on the right.
- Tick only Delete subfolders and files and Delete. Leave every other box unticked.
- Click OK, then Apply, and confirm the Windows security warning about Deny entries.
Now sign in as that user and try to delete a test file. Windows should show an Access Denied message. The user can still open the files, and can create new ones if they already had permission to.
Method 2: Use the icacls command for several folders or PCs
If you protect the same folder on many computers, the built-in icacls command is faster and gives the same result. Open Command Prompt as administrator and run:
icacls "D:\LabData" /deny "analyst1:(OI)(CI)(DE,DC)"
D:\LabDatais the folder to protect.analyst1is the user to restrict. UseDOMAIN\userfor domain accounts.(OI)(CI)make the rule apply to all files and subfolders inside.DEdenies Delete andDCdenies Delete subfolders and files.
To check the result, run icacls "D:\LabData" and look for a line with (DENY). To undo it later, remove the Deny entries for that user:
icacls "D:\LabData" /remove:d "analyst1"
Method 3: Shared folders on a network
For a folder shared from a server or another PC, apply the Deny rule above to the folder's NTFS permissions on the computer that hosts it. Share permissions only control access over the network and are less precise; the NTFS Deny entry protects the files however users reach them.
Limits you should know about
- Some programs may not be able to save. Many applications, including Microsoft Office, save by writing a temporary file and then deleting or renaming files. With delete denied, saving edits inside the protected folder can fail. Test with the real application before rolling out.
- Moving files out is also blocked. Moving a file is treated as copy plus delete, so the user cannot move files out of the folder either.
- Administrators and owners can undo it. An administrator, or a user who owns the files, can change the permissions back. Use a standard (non-administrator) account for the restricted user.
- Copying is not blocked. The user can still copy the files elsewhere or copy and paste their contents. NTFS permissions do not control the clipboard.
- It is manual work. Each folder, each user and each computer has to be set up and checked by hand, and settings can be changed later without anyone noticing.
When to use ControlShield instead
In regulated environments such as pharmaceutical QC laboratories, deletion is only half the problem: copying laboratory data out of controlled folders matters too. ControlShield applies the same NTFS deletion protection for a selected Windows user and adds what Windows does not do on its own:
- restricts Cut, Copy and Paste shortcuts and right-click actions for that user,
- clears restricted clipboard content,
- shows a clear notification when an action is blocked,
- starts automatically at login, with a password-protected administrator exit,
- installs with a self-contained Windows installer, so setup is the same on every workstation.
It helps QC, QA and production teams support 21 CFR Part 11, EU GMP Annex 11 and ALCOA+ data-integrity practices without changing the laboratory application.
Frequently asked questions
Can I stop deleting but still allow editing?
Yes. The Deny rule only removes the delete permissions, so users keep their read and write access. Some programs need to delete temporary files when saving, though, so test saving with the real application first.
Does this work on Windows 10?
Yes. The File Explorer steps and the icacls command are the same in Windows 10 and Windows 11.
Can administrators still delete the files?
Yes. Administrators, and users who own the files, can change permissions and remove the Deny rule. Give restricted users a standard account.
How do I undo the restriction?
Open Properties, Security, Advanced, select the Deny entry for the user and click Remove. Or run icacls with /remove:d and the user name.
Windows how-to