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 theTEMPvariable 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
TEMPfolder 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 these commands one by one and press Enter after each command:
takeown /f %temp% /r /d y icacls %temp% /reset icacls %temp% /inheritance:r icacls %temp% /grant %username%:(OI)(CI)F /t /c icacls %temp% /grant *S-1-5-32-544:(OI)(CI)F /t /c icacls %temp% /grant *S-1-5-18:(OI)(CI)F /t /c md %temp%\Low icacls %temp%\Low /setintegritylevel (OI)(CI)low
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.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
Thank you! I was like Faye too! Everything was fine, still did the steps 1-3 and it worked! Thank you so much. I was so frustrated!
An easier way for me to get permission to access temp than the last three steps was to right click on the Temp folder, click properties, click the Security tab, then add my user name to the permissions section at the top.
So glad to use this. I was becoming frustrated. The steps worked for me. Just put the spaces and colons as seen. Thank you.
It works like a charm! thanks! 🙂
GREATTT! Thank you so muchhh. This is so brilliant!
WOW Thank you. It worked – I had the temporary file correct so I did the takeown /f %TEMP% /r /d y and all of the other commands and now I can make zip files.
Thank you!!
Worked like a charm – Thanks!. What I don’t understand is why I needed to do this. I was able to use the command a month ago but it would not work for me today. Who changed my system? Was this a “Microsoft update” induced error?
Thank you!! Thank you!! Thank you!! Finally instructions that actually worked :)! I am also confused on how these settings got changed when I was able to compress files in the past but not recently.
Thank you so much! Even though I had the full control ownership, I still could not ZIP folders, but after following the instructions for “Verifying and Fixing Permissions for the %TEMP% Folder”, it works now.
Even though I could create a file in the TEMP folder, I went through the steps anyway and it fixed my problem!
Great work! Truly genius. I would never never been able to come close to a solution without your help. Thank you from the bottom of m heart!!!!!!!!!
Thank you.
Thank you that was amazing it is fixed I appreciate this valuable advice
Thanks so much! This fixed my issue.
All my permissions were okay, was able to create/delete file, but following others’ lead on here I executed steps 1-3 and it worked perfectly. I can finally zip the pictures and move them to the external hard drive. Yay! Thanks to everyone who input & commented.
Like someone commented above, I also had a TMP file in Environmental Variables. I deleted this and now I can zip perfectly. Thanks for your clear steps.
I was able to follow the suggestions (although none worked) until I got to “Open an elevated or Administor Command Prompt” in Step 2. How, exactly, does one open an Administor Command Prompt?
@Trebor:
Right-click Start, and click Run.
Type cmd.exe in the Run dialog
Press Ctrl + Shift and Enter.
Awesome instructions. Even though the permissions were set correctly. I followed steps 1-3 to fix permissions. Now able to create zip files.