Resolving "Permission Denied" Errors During Local Preview on Windows
Last updated: September 8, 2025
When running spacectl preview on Windows, you may encounter a "permission denied" error during repository unpacking. This typically occurs when the system temporary directory lacks proper write permissions.
Common Error Message
The error usually appears similar to this:
FAILED: could not retrieve repository content from VCS: could not unarchive repository tarball file: reading file in tar archive: permission deniedResolution Steps
Check Temporary Directory Permissions
Ensure your Windows user has full write access to the temp folder located at:
C:\Users\[YourName]\AppData\Local\TempAlternative Solutions
Set the
TMPDIRenvironment variable to point to a known writable locationRun the preview using WSL (Windows Subsystem for Linux) or Docker to bypass Windows-specific permission issues
Check Repository Location
If your repository is stored in OneDrive or another cloud storage location, try cloning it to a local directory (like your desktop) to avoid potential permission conflicts.
If the issue persists after trying these steps, please contact support with details about your environment and the specific error message you're encountering.