sodcalculator

10 Tech How-To

Fix Windows Search Directory Permissions

Guide 10-14158 · Updated · Step by step

If Windows Search stops returning results or throws errors like “Access is denied” or “Search results may be incomplete,” incorrect permissions on the search index directories are often the culprit. This guide walks you through resetting those permissions safely, restoring full search functionality without reinstalling Windows or creating a new user profile. You’ll need administrator access to your PC and a few minutes of patience—no third-party tools required.

What You’ll Need

  • An account with administrator privileges on the Windows PC.
  • Ability to restart the Windows Search service (or reboot the PC).
  • Optional: a backup of your current permissions (export a registry key) if you want to revert changes.

Step-by-Step

  1. Open an elevated Command Prompt or PowerShell. Click Start, type cmd or PowerShell, right-click the result, and choose “Run as administrator.” Accept the UAC prompt.
  2. Stop the Windows Search service. In the elevated window, type net stop wsearch and press Enter. Wait for the service to stop. If it doesn’t stop, you can also stop it via Services.msc (services.msc → Windows Search → Stop).
  3. Navigate to the Search data folder. The default location is C:\ProgramData\Microsoft\Search. In the same command prompt, type cd /d C:\ProgramData\Microsoft\Search and press Enter.
  4. Take ownership of the Search folder. Run the following command to take ownership recursively: takeown /F . /R /D Y. This gives the Administrators group full ownership of every file and subfolder. It may take a minute or two.
  5. Grant full control to SYSTEM and Administrators. Use the icacls command to reset permissions. Run: icacls . /reset /T /C /Q. This resets all files and subfolders to inherit the default permissions from the parent folder (ProgramData).
  6. Explicitly grant SYSTEM full control (if needed). In some cases, the reset above doesn’t apply to the top folder itself. Run: icacls . /grant SYSTEM:(OI)(CI)F /T to ensure SYSTEM has full control over all contents.
  7. Restart the Windows Search service. Type net start wsearch and press Enter.
  8. Rebuild the search index (optional but recommended). Open Control Panel → Indexing Options → Advanced → Rebuild. This forces a fresh index and will pick up any files that were previously inaccessible.
  9. Test search. Open File Explorer and search for a file you know exists. Also test the Start menu search. If results appear, you’re done.

Common Mistakes

  • Skipping the service stop. Permissions changes while the search service is running can cause file locks and partial changes, leaving the issue unresolved.
  • Using the wrong folder path. Some guides mention C:\ProgramData\Microsoft\Search\Data—that’s the subfolder with the actual index files. Resetting permissions on the entire Search folder is safer and covers all subcomponents.
  • Forgetting to run as administrator. Without admin rights, takeown and icacls will fail with “Access denied.”
  • Granting permissions to your user only. The search service runs under the SYSTEM account, so if you only grant your own user account, the service may still fail. Always include SYSTEM.
  • Not rebuilding the index. Even with correct permissions, the existing index may be corrupted. A rebuild is often necessary.

Tips

  • If you’re uncomfortable with command line, you can use the GUI: right-click the Search folder → Properties → Security → Advanced → change owner to Administrators, then replace all child object permissions with inheritable permissions from the parent.
  • Export the current ACL before making changes: icacls C:\ProgramData\Microsoft\Search > search_perms_backup.txt. This gives you a reference if you need to restore something specific.
  • After the fix, avoid manually changing permissions on the Search folder again—Windows manages them automatically.
  • If you have a laptop, keep it plugged in during the rebuild to avoid interruption.

Troubleshooting

If the steps above don’t resolve the issue, try the following:

  • Check if the service starts. If net start wsearch fails, look in Event Viewer (eventvwr.msc) under Windows Logs → System for errors from the Search service. The error code will point to the specific cause.
  • Verify the folder path exists. If C:\ProgramData\Microsoft\Search is missing, the service may have been moved or uninstalled. In that case, run sfc /scannow to repair system files.
  • Try a clean boot. Third-party security software can interfere with permissions. Disable them temporarily (or uninstall) and test search.
  • Use the Windows Search troubleshooter. Go to Settings → Update & Security → Troubleshoot → Additional troubleshooters → Search and Indexing. Run it—it may automate some of the fixes.
  • If the problem persists, create a new user profile. This is a last resort but often isolates whether the issue is profile-specific.

Frequently Asked Questions

Q: Will this delete my search history or indexed files?
A: No. The commands only change permissions, not file contents. However, rebuilding the index (step 8) will delete the existing index and recreate it, which may take a few hours on large drives.

Q: Is it safe to run takeown on the entire Search folder?
A: Yes, because the folder is only used by Windows Search. Taking ownership gives Administrators full control, which is exactly what the service needs. It won’t affect other system components.

Q: I’m getting “Access denied” when running icacls. What’s wrong?
A: Make sure you’re in an elevated command prompt (Run as administrator). Also, if the Search service is running, stop it first—it may lock files.

Q: How long does the index rebuild take?
A: It depends on the number of files and drive speed. For a typical 500GB drive with 200k files, expect 1–3 hours. You can continue using your PC, but search results will be incomplete until it finishes.

Q: Do I need to reinstall Windows if this doesn’t fix it?
A: Rarely. The issue is almost always fixable with the above steps. If not, check for corrupted system files with sfc /scannow or consider a repair install (in-place upgrade) which preserves your files.

Q: Can I use this fix on Windows 10 and Windows 11?
A: Yes, the commands work on both. The folder path is the same, though in Windows 11 the Start menu search uses the same index.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →