When you try to create a Compressed (zipped) folder in Windows, the error “Unable to complete the operation. Access is denied” may occur and the zip file is not created.
Compressed (Zipped) Folder Access Denied error occurs if the user %TEMP%
variable isn’t properly set, or the user has no “write” access to their %TEMP%
folder.
Instructions in this article apply to all versions of Windows, including Windows 10/11.
[Fix] Compressed (Zipped) Folder Access Denied Error
Step 1: Fix the TEMP environment variable
To fix the Compressed (Zipped) Folder Access Denied Error, fix the %TEMP%
variable using these steps:
- Right-click “This PC” and click Properties.
- Click Advanced System Settings.
(Alternately, you can launch this dialog directly by runningsystempropertiesadvanced.exe
) - Click Environment Variables
- In the User variables for <username>, select TEMP and click Edit…
(In case theTEMP
variable is missing, you’ll have to create one by clicking the New… button.)
- Verify that the variable value is set as:
%USERPROFILE%\AppData\Local\Temp
- Click OK.
- Log off and log back into your user account.
If the variable values are correctly set and the problem still persists, verify if the user account has Full Control permissions for the user TEMP
folder.
Step 2: Verify and Fix Permissions for the %TEMP% Folder
If Step 1 doesn’t help or the %TEMP%
variable is intact, then the next step is to verify and, if necessary, fix the NTFS permission for the %TEMP%
folder. Follow these steps:
Verify the TEMP folder permissions
- Click Start, type %TEMP% and press Enter. This opens the
TEMP
folder of your user account. - Try creating a test file in that folder, and delete it.
If you’re unable to create a test file in that folder due to insufficient access, taking ownership and assigning Full Control permissions to the folder should resolve the problem. Follow these steps:
Fix the TEMP folder permissions
- Open an elevated or Administrator Command Prompt.
- Type the following command and press Enter
takeown /f %TEMP% /r /d y
- Then, type these commands one by one and press Enter after each command:
icacls %TEMP% /grant SYSTEM:F /T icacls %TEMP% /grant {username}:F /T
- Replace
{username}
with the actual user account name, such as:icacls %TEMP% /grant John:F /T
… where John is the user name.
For more information on Taking Ownership and Assigning Permissions, see our earlier article How to Take Ownership of a file or folder using command-line.
That’s it! You’ve fixed the %TEMP%
user variable and TEMP
folder permissions now. This should resolve the Compressed (Zipped) Folder Access Denied Error.