Password Protected Zip Files open without pwd on Windows?!

I have been encrypted ZIP archives on my Mac for some time using the Terminal "zip -er <<archivename.zip>> <<folder>>". method. This creates a zip archive that when you try to open in Mac OS it prompts for password.


If you copy the ZIP to Windows 10/11 they open without prompt!?!?


Why?

iMac 27″, macOS 14.4

Posted on May 9, 2024 7:54 AM

Reply
6 replies

May 10, 2024 4:37 PM in response to matgra

I don't use Windows much these days & I don't believe I've had to deal with an encrypted Zip file since WinXP where WinXP could not even open them without a third party app.


A quick search reveals two possibilities. One is that you are just seeing the file list & folder structure of the encrypted folder. The other possibility is the password has been saved into Windows equivalent of a keychain after the file is opened one time. Here are the three forum threads where I found these two possibilities.


To solve the former issue of encrypting even the file/folder list, you would need to encrypted the Zip file so you would have two Zip files one inside of the other. For the latter issue of the password being saved, try renaming the Zip file to see if it now prompts you for a password.


https://superuser.com/questions/70313/7-zip-doesnt-ask-me-for-a-password-for-a-zip-file-i-encrypted-while-double-clic


https://answers.microsoft.com/en-us/windows/forum/all/windows-10-opens-encrypted-zipped-archives-without/b37d0191-d8b0-49a5-b6c1-6163081fb0f1


https://www.sevenforums.com/general-discussion/402378-password-encrypted-7zip-file-opens-without-password.html

May 9, 2024 8:06 AM in response to matgra

Using Spotlight, type in Terminal.

Change your directory to the location of your folder. For example, in my instance, I would type cd /Volumes/dataMAC and hit enter.

Type in ls to make sure you see your folder.

Now type in the command that will simultaneously compress and password protect the files in the form of zip -er FILENAME.zip FILESorFOLDERStoCOMPRESS.

➡️ In my example, that would be zip -er Mytaxes.zip ForTaxes/. ⬅️

Hit return/enter.

Next, you'll be prompted with a password prompt—type in the password you want to use to protect the files. Enter the password twice.

You should now see your compressed and password-protected zip file in Finder.

You can test the protection by double-clicking the file.

Enter your password. The file will be uncompressed into the same directory

May 9, 2024 9:41 AM in response to matgra

To follow on, if I may.


These are Forum Hosted by Apple and for Apple Products, using Apple Devices,Apple Accessories and Apple Services.


Yes, one is caring a Password Protect zip fine on that platform and we agree on that count.


Though, how the same zip file created on macOS performs on another Operating System on a Non Apple Platform - that is really out of my scope to answer

May 10, 2024 10:29 PM in response to matgra

I did a quick test with 'zip -re output.zip test.txt' and Windows 10 via VMware.


I copied the output.zip to Windows desktop and I could see list & folder structure of the encrypted folder but had to enter password to see the contents of that file.


I deleted output.zip and again copied it to the Windows desktop and this time I did not have to enter password to see the contents.


I deleted output.zip and again copied it to the Windows, but this time to a new folder on Windows desktop and now I had to enter password.


So it seems Windows caches the password?

Password Protected Zip Files open without pwd on Windows?!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.