If you get "access denied" on EFS encrypted files after reinstalling Windows, resetting your password or moving a drive to a new PC, it is because EFS files can only be opened with the certificate and private key of the account that encrypted them. A fresh Windows installation creates a new account with new keys, even if the user name is the same. The fix is to import your original EFS certificate from a PFX backup. Without that backup, or a recovery agent certificate, the files generally cannot be decrypted.
This guide helps you confirm the problem really is EFS, restore the certificate if you have it, explore the limited options if you do not, and make sure it never happens again.
Step 1: Confirm the problem is EFS, not permissions
"Access denied" has two common causes after a reinstall, and the fixes are completely different.
| Sign | Likely cause |
|---|---|
| File icons show a small padlock | EFS encryption |
| Properties → Advanced shows Encrypt contents to secure data ticked | EFS encryption |
| You cannot even open the folder, and the Security tab lists an unknown account (a long S-1-5 number) | NTFS permissions from the old install |
Running cipher in the folder lists files with E | EFS encryption |
If it is only permissions, you can fix it as an administrator: right-click the folder, choose Properties → Security → Advanced, click Change next to Owner, enter your user name, tick Replace owner on subcontainers and objects and apply. Then give your account Full control. Taking ownership does not decrypt EFS files, though. If the files are encrypted, they will still refuse to open.
To see which certificate an EFS file needs, run cipher /c "C:\path\file.docx". It lists the users and certificate thumbprints that can decrypt it, which helps you match it to a backup.
Step 2: Import your EFS certificate backup
If you, or Windows, exported the certificate at some point, look for a .pfx file. Check USB sticks, old backup drives, your Documents folder from the old installation, and cloud storage. Windows prompts you to back up the key the first time you use EFS, so many people saved one without remembering.
- Sign in to the account that should open the files.
- Double-click the
.pfxfile. The Certificate Import Wizard opens. - Choose Current User and click Next until asked for the password.
- Enter the password you set when exporting. Tick Mark this key as exportable so you can back it up again later.
- Let Windows choose the store automatically and finish.
- Try opening an encrypted file. If it opens, the job is done.
Once the files open, run cipher /u to update encrypted files to your current keys, or decrypt them and switch to a method you find easier to manage.
Step 3: If you have no PFX backup
Options are limited, and it is important to be realistic. EFS is designed so that files cannot be read without the key.
- Work or school PC: PCs joined to a company domain often have a data recovery agent configured by IT. Ask your IT team before doing anything else. They may be able to decrypt the files for you.
- The old installation still exists: if Windows was reinstalled without formatting, a
Windows.oldfolder may contain your old user profile, including its certificate store and protected private keys. Those keys are protected by your old account password. Recovering them is possible in some cases with specialist tools and the old password, but it is technical and not guaranteed. Do not deleteWindows.oldor run Disk Cleanup until you have decided. - The old drive is still intact: if you moved a drive to a new PC, the old PC's system drive may still have the original profile. Booting it and exporting the certificate from there is the simplest route.
- Other copies of the files: check backups, email attachments, cloud storage and USB drives. EFS copies made to cloud services or FAT32 drives were usually saved unencrypted.
Be wary of services that promise to "crack" EFS. Without the original key material, strong encryption cannot be reversed. A reputable data recovery firm will tell you plainly what they need, usually the old drive and your old password.
If none of those apply, the files are most likely lost. That is hard to hear, but it is also how encryption is supposed to work. Our guide on what to do if you forgot the password to an encrypted file covers the same reality for other file types.
Why this happens: how EFS keys work
When you encrypt a file with EFS, Windows encrypts it with a random file key. That file key is then locked with the public key of a certificate created for your user account. The matching private key is stored in your user profile and protected by your Windows sign-in.
So your files depend on three things: the user profile, the certificate inside it, and the password that protects the private key. These events break the chain:
- Reinstalling Windows creates a new profile with a new certificate.
- An administrator resetting a local account's password can cut off access to the protected private key, unlike changing the password yourself.
- Moving a drive to another PC means the profile and key stay behind on the old system.
- Deleting and recreating a user account has the same effect as a reinstall.
How to prevent it next time
- Export your certificate now. Run
certmgr.msc, open Personal → Certificates, right-click the certificate for Encrypting File System and choose All Tasks → Export, including the private key. Or runcipher /xand follow the prompts. - Store the PFX off the PC, on a USB stick or in a password manager, with its password kept separately.
- Decrypt or re-protect before reinstalling. Before any reset, reinstall or drive move, either decrypt EFS files or confirm you have a working certificate backup.
- Test the backup. On a spare account or PC, import the PFX and open a test file.
The cipher command guide shows the backup and status commands in more detail.
Consider encryption that does not depend on your Windows account
EFS is convenient because it is invisible, but that invisibility is what makes reinstalls dangerous: the keys live somewhere most people never look. Password-based encryption avoids the issue. A file encrypted with a password opens on any PC with that password, regardless of which Windows account or installation you are using.
Document Key works this way. It encrypts files and folders with AES-256 and your password, and asks you to print or save a recovery key at setup, so a forgotten password or a fresh Windows install does not lock you out. Files stay encrypted when copied to USB drives or cloud folders, and it runs on every edition of Windows 10 and 11, including Home, where EFS is not available at all.
Whichever method you use, the lesson is the same: the recovery details are part of the encryption. Keep them somewhere other than the PC that holds the files.
Frequently asked questions
Why can I not open my EFS files after reinstalling Windows?
EFS keys belong to your old user account's certificate. A new Windows install creates a new account with different keys, so the old files cannot be decrypted without the original certificate.
How do I back up my EFS certificate?
Run certmgr.msc, open Personal, Certificates, find the certificate with Encrypting File System as its purpose, and export it with the private key to a password-protected PFX file.
Can I recover EFS files without the certificate?
Generally no. Without the original certificate and private key, or a recovery agent certificate, the files cannot be decrypted.
