[Fix] Compressed (Zipped) Folder Access Denied Error “Unable to Complete the Operation”

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.

temp variable set - zip folder access denied

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:

  1. Right-click “This PC” and click Properties.
  2. Click Advanced System Settings.
    (Alternately, you can launch this dialog directly by running systempropertiesadvanced.exe)
  3. Click Environment Variables
  4. In the User variables for <username>, select TEMP and click Edit…
    (In case the TEMP variable is missing, you’ll have to create one by clicking the New… button.)
  5. Verify that the variable value is set as:

    temp variable set

  6. Click OK.
  7. 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

  1. Open an elevated or Administrator Command Prompt.
  2. 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 Administrators:(OI)(CI)F /T /C
    icacls %temp% /grant SYSTEM:(OI)(CI)F /T /C
    md %temp%\Low
    icacls %temp%\Low /setintegritylevel (OI)(CI)low
  3. 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!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

41 thoughts on “[Fix] Compressed (Zipped) Folder Access Denied Error “Unable to Complete the Operation””

  1. This happens to me whenever I try sendin one or more fille to a compressed file using the context mene. As you advised, I checked the ownership of the files and the folder that the files are in, and I own the files and folder, also I have full control over these files and folders. So what else should I do to fix this. You didn’t cover this, but I also found that when I copy a file I own, the resulting copy is owned by the Administrator, not me. I’m in the Administrator group, so this isn’t normally a problem, but shouldn’t I be the owner of the new file?

  2. Although the value in Step 5 was as it should be, and I was able to create and delete a test folder in TEMP, I was still getting this proble, so I followed Instructions 1 – 3 to verify and fix permissions and the problem was fixed.

    Thank you

  3. I cannot thank you enough! like Faye the values were correct and was able to create and delete the test file but the three steps did the trick and now can make compressed zip files. Thank you !

  4. Thank you so much for the write up! Saved my life since I have tons of files and folders to turn in a for a class assignment and the deadline is in 30 minutes!

  5. Thanks I managed to fix it with 3 steps. But once I restart or switch on my pc before start, the problem come back again.

  6. Thank you! I have been trawling the net for a solution to this for half a day and bye jove you fixed it! Reports finally zipped and sent into work. Great work and many thanks. :o)

  7. I had this issue, but instead of having a TEMP variable in my Environment Variables I also had a TMP variable in there, I deleted the TMP one that seems to have fixed it

  8. Thank you! Thank you! Thank you! I tried a few different websites to no avail before stumbling on to this one – problem now solved.

  9. I did not have any of the two problems above (temp was written in correctly, and I was able to create a file in the temp folder), but I still get the same error message.

  10. I had the same problem. Nothing fixed it… Until I did the last step you suggested
    THEN IT WORKED!!!! PS. spaces are important for this to work.

  11. You are awesome. After going through forum after forum and trying multiple fixes unsuccessfully without finding a solution to the problem. This right here is the only solution that works. Great that someone actually found a fix for this error. Thank you so much.

  12. This worked like a charm, once I figured out how to open an “elevated Command Prompt”! thanks so much for the instructions–why something as simply as zipping a file should be so complicated, no idea, nor why I, the sole owner of the computer and software should not automatically have full permission to everything–incomprehensible. Thanks again!

  13. THANK YOU! This is the only place I could find a solution to this irritating issue. I had to run the icacls commands and voila, it now works.


  14. How do I reset this back to the way it was before I typed these commands in? I can’t save to the desktop… this is bad. Oh boy…

  15. I have been trying to zip files for months and I was denied access. Somehow my user name was shortened and by replacing {username} with the actual user account name allowed me to retype my user name made everything work perfectly!

    Thank you!

  16. Yeah!! The last step working brilliantly! Agreed with Krystle that it’s important to put the spaces in to get the commands to work. Thank you! So rewarding.

  17. In my case, I had added new path to PATH variable but forgot the trailing ; (semicolon) and that was causing this problem, so check your PATH environment variable too, in fact that might be more likely suspect then TEMP.

  18. 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!

  19. 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.

  20. 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!!

  21. 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?

  22. 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.

  23. 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.

  24. 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!!!!!!!!!

  25. 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.

  26. 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.

  27. 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?

  28. Awesome instructions. Even though the permissions were set correctly. I followed steps 1-3 to fix permissions. Now able to create zip files.


Leave a Comment