How to Fix “Store Read Only” Error When Adding Apple Developer Certificate to Trusted Root CA in Windows 7


2 views

When working with Apple Push Notification Service (APNS) on Windows 7, developers often need to install the Apple Developer certificate into the Trusted Root Certification Authorities store. The error message you're seeing typically occurs due to permission issues in the certificate store hierarchy, even when running as administrator.

Windows 7 implements stricter security controls over certificate stores compared to later versions. The system has two layers of protection:

  • Registry permissions for the certificate store location
  • File system permissions for the actual certificate storage

Try this manual approach first:

1. Press Win+R, type "mmc" and press Enter
2. Go to File > Add/Remove Snap-in
3. Select "Certificates" and click Add
4. Choose "Computer account" > Next > Local computer
5. Expand Certificates > Right-click Trusted Root Certification Authorities
6. Select All Tasks > Import

If this fails, we'll need to modify permissions directly.

The certificate store is managed through these registry keys:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\Root\ProtectedRoots
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EnterpriseCertificates\Root\Certificates

To modify permissions:

1. Open regedit as Administrator
2. Navigate to the above keys
3. Right-click each key > Permissions
4. Add your user account with Full Control
5. Apply changes and restart the computer

For batch operations or CI/CD pipelines, use certutil:

certutil -addstore -user Root apple_developer.cer

Or with PowerShell:

Import-Certificate -FilePath "C:\path\to\cert.cer" -CertStoreLocation Cert:\LocalMachine\Root
  • Check disk space - A full disk can trigger this error
  • Verify certificate validity - Expired certs may fail silently
  • Try exporting/reimporting the certificate
  • Consider using the Current User store instead of Local Machine

Many developers encounter this frustrating Windows 7 certificate store error when working with push notification certificates or other security credentials. The "read only" message appears even when running as administrator, preventing crucial development workflows.

Windows 7 maintains strict permissions on its certificate stores. The Trusted Root Certification Authorities store is particularly locked down due to security concerns. Common triggers include:

  • Incorrect registry permissions
  • Group Policy restrictions
  • Corrupted certificate stores
  • System file protection mechanisms

Here are tested approaches that have resolved this for numerous developers:

Method 1: Using certmgr.msc with Elevated Privileges

Run this command as Administrator:

start certmgr.msc

Then navigate to "Trusted Root Certification Authorities" → Right-click → All Tasks → Import

Method 2: Certificate Manager Command Line

For automation scenarios, use certutil:

certutil -addstore -user Root "C:\path\to\certificate.cer"

Method 3: PowerShell Alternative

For modern environments with PowerShell 3.0+:

$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
$cert.Import("C:\temp\apple_developer.cer")
$store = New-Object System.Security.Cryptography.X509Certificates.X509Store("Root","LocalMachine")
$store.Open("ReadWrite")
$store.Add($cert)
$store.Close()

If basic methods fail, check these system aspects:

  • Run sfc /scannow to verify system files
  • Verify registry permissions at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\Root\ProtectedRoots
  • Check group policy settings with gpresult /h report.html

For developers specifically dealing with Apple push notifications, ensure:

# Verify certificate chain first
openssl x509 -in aps_developer.cer -text -noout

Then convert to PFX if needed:

openssl pkcs12 -export -out aps_developer.pfx -inkey privateKey.key -in aps_developer.cer