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

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.

[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 Computer, click Properties
  2. Click Advanced System Settings(Alternately you can launch this page 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:
    %USERPROFILE%\AppData\Local\Temp
  6. Click OK.
  7. Logoff and Login back to 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: Verifying and Fixing 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. Use these steps:

Fix the TEMP folder permissions

  1. Open an elevated or Administrator Command Prompt.
  2. Type the following command and press {ENTER}
    takeown /f %TEMP% /r /d y
  3. 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
  4. 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 in Windows.

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.

About the author

Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and has a vast experience in the ITeS industry — delivering support for Microsoft's consumer products. He has been a Microsoft MVP [2003 to 2012] who contributes to various Windows support forums.

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

    THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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

Leave a Comment