On Windows, Publishing a project fails due to zip error

Problem

When you try to publish a project to the Exploratory Server, it fails with the following zip error.

Error code: 15
Error: Command failed: zip -q -r "C:\Users\12345\AppData\Local\Temp\IWl7wiZ6\project.zip" _archived_project index.json -i@zip_include.txt -x@zip_exclude.txt && rmdir /S /Q _archived_project

Root Cause

This happens when the Windows user does not have write permissions on their own AppData\Local\Temp folder.

  1. Group Policy Restrictions

    • IT administrators may have applied group policies that restrict access to C:\Users\<username>\AppData\Local\Temp.
    • This is common in corporate or managed environments.
  2. Antivirus or Security Software

    • Some security software may block modifications to the Temp folder, especially for executables or scripts.
  3. Corrupted User Profile or ACL Issues

    • If the user’s profile was copied or restored incorrectly, the folder permissions (Access Control List - ACL) might be broken.
  4. Running as a Different User

    • If your app is running under another user account (e.g., a service account), it might not have permission.

How to Check and Fix Permissions:

Check Current Permissions

  1. Open Command Prompt (cmd.exe) as Administrator.
  2. Run:
    icacls C:\Users\121274\AppData\Local\Temp
    
    • Look for 121274:(OI)(CI)(F), which means full control.
    • If the output lacks (F) for your user, permissions are incorrect.

Fix Permissions

  1. Run:

    icacls C:\Users\121274\AppData\Local\Temp /grant 121274:(OI)(CI)F
    
    • This grants Full Control recursively.
  2. Alternative via GUI:

    • Right-click C:\Users\121274\AppData\Local\TempPropertiesSecurity.
    • Ensure your user has “Full Control”.
    • If not, click Edit, select your user, and check Full Control.

Workarounds:

If you cannot change permissions, consider:

  • Running the app with Administrator privilege.
  • Contact IT if this is a corporate-managed PC.