0X80030005

STG_E_ACCESSDENIED (0X80030005) on External HDD

Hardware – Hard Drives Intermediate 👁 8 views 📅 Jun 18, 2026

Quick answer: This means Windows can't access the drive due to permission or corruption. Happens often with external drives after a failed eject or on USB 3.0 hubs.

Quick Answer

Open Command Prompt as Administrator, run diskpart, then list disk, select disk X (your external drive), clean, then create a new partition. That wipes the drive but fixes it 90% of the time. If you need the data, skip to Alternative Fixes.

Why This Happens

You're seeing 0X80030005 because Windows can't read the drive's file system table. The culprit here is almost always a corrupted partition or a failed write operation. I've seen this on external USB drives that were yanked out mid-transfer, on SD cards used in cameras, and on drives plugged into cheap USB 3.0 hubs. The error code itself translates to "storage access denied" — but it's rarely a real permission issue. It's Windows saying "I can't make sense of this drive's layout, so I'm blocking you."

Don't bother checking file permissions or taking ownership — that rarely helps. The file system structure is toast, not the file ACLs.

Step-by-Step Fix

  1. Open Command Prompt as Admin. Hit Start, type cmd, right-click it, select "Run as administrator."
  2. Run diskpart. Type diskpart and hit Enter. Accept the UAC prompt.
  3. List disks. Type list disk. You'll see a table of all drives. Your external drive is probably the one with the right size. Be absolutely sure — you're about to wipe it.
  4. Select the drive. Type select disk X (replace X with the disk number from step 3).
  5. Clean it. Type clean. This removes all partitions and data. Yes, you lose everything. If you need files, skip to Alternative Fixes.
  6. Create a new partition. Type create partition primary.
  7. Format the drive. Type format fs=ntfs quick (or fat32 if you need it for older devices).
  8. Assign a drive letter. Type assign. Then type exit twice.

That's it. Your drive should now show up in File Explorer with full access.

Alternative Fixes (If Main One Fails)

Try CHKDSK from Recovery Environment

If diskpart fails with "access denied" on the clean command, boot from a Windows recovery USB. Boot to it, choose Repair your computer, Troubleshoot, Command Prompt. Then run chkdsk D: /f (replace D: with your drive letter). This can repair file system damage without wiping data.

Verify the USB Cable and Port

I've wasted hours on software fixes only to find a bad cable. Try a different USB port — preferably a USB 2.0 port (black/white) instead of USB 3.0 (blue). USB 3.0 ports sometimes have driver issues with older enclosures. Also try a short, thick cable — long thin cables drop voltage, causing intermittent errors.

Use a Different Computer

Plug the drive into another PC. If it works there, the issue is on your main machine — check USB controller drivers in Device Manager. If it fails on every PC, the drive's controller board may be dying. In that case, data recovery services are your only option.

Run SFC and DISM (Rarely Helps)

System file corruption can cause this error on the internal drive, but almost never on an external drive. If you've exhausted everything else, run sfc /scannow followed by DISM /Online /Cleanup-Image /RestoreHealth. I'd skip this entirely unless the error also happens on your internal C: drive.

Prevention Tips

This error happens because of abrupt disconnections. Always use the "Safely Remove Hardware" icon in the system tray before unplugging a USB drive. For external drives with a power switch, turn them off before disconnecting USB. Also, avoid USB hubs — they add another layer of failure between your data and the PC. Plug directly into the motherboard's USB ports.

If you see this error repeatedly on the same drive, the drive itself is failing. Back it up now — don't wait. Use something like CrystalDiskInfo to check the S.M.A.R.T. health status. If it shows reallocated sectors or pending sector counts, replace the drive.

Was this solution helpful?