Extracting from Mac-created zip gives me encrypted files?

Status
Not open for further replies.

me2

Ars Tribunus Militum
2,102
Whenever I extract files from a zip archive created on a Mac (containing a __MACOSX folder at the root), I get files/folders with green filenames (and encrypted checked in the properties).

This only happens with the built-in unzipper (either by extracting with a right click or by dragging files out of the archive in explorer). 7-Zip extracts normally. This is on Windows 7 64-bit. Never saw this happen on Windows XP.

Why is this, and how do I prevent it?



Here's an example zip in case anyone else wants to try it: http://ded.increpare.com/~locus/activat ... ve_win.zip

aQjMe.png
 

Ardax

Ars Legatus Legionis
18,956
Subscriptor
I've seen weird shit like this happen before. For some reason, the Yii Framework zip files extract with a strange icon overlay with 7-zip. Previous versions used to have a black clock looking thing, I think it indicated the files were offline. What's worse, the only way to get rid of that overlay was to copy the files to a medium that didn't support those attributes (e.g. a FAT32 partition), then copy them back.

I've seen zip files get extracted and have the contents be encrypted as well.

There's got to be some sort of metadata in the zip file that's causing it to happen, but I'll be damned if I know what or why. It's rare enough that I've never bothered trying to determine the underlying cause.
 

me2

Ars Tribunus Militum
2,102
It's rare enough that I've never bothered trying to determine the underlying cause.
For me, it's more that I'm worried that if I neglect to decrypt it or backup my encryption key, I will end up with unusable files after a future windows install or an attempt to recover data from this disk through another computer.

I just don't like that there is some bug that is causing data to be unnecessarily encrypted.

Unfortunately, I get a lot of zip files from Mac users (myself included). I guess I'll just need to phase out use of the built-in unzip tools.
 

Valkyrie Millia

Ars Scholae Palatinae
998
Yes. This behavior happens on my Vista (32-bit) install.

My “fix” has been to move the files onto a Fat32 medium (zip drive, USB stick) and move them back as suggested by Ardax.

It would be really nice to know of a way to just point and click to remove the encryption property.

It would of course be better if the issue did not exist and I don't really care if it’s on Microsoft’s or Apple’s end.
 

Ardax

Ars Legatus Legionis
18,956
Subscriptor
Well, for encryption it's easy enough. Bring up the properties for the files/folders that are encrypted, click "Advanced" and uncheck the encryption checkbox.

It's a hell of a lot faster than moving the files to a FAT32 partition and back.

For the weird attributes I was seeing, there's no easy GUI way to remove them -- the easiest fix was the copy.
 

Valkyrie Millia

Ars Scholae Palatinae
998
Thanks Ardax,

I’m not in front of a Windows install at the moment, but I’ll give it a try when I get a chance.

I remember screwing around in the properties panel, but I couldn’t get the file names to not show up green colored. I might be confusing the terminology, maybe it’s not encryption; basically it was the issue of green coloring that I wanted removed.

Again, it didn’t hurt anything, but it just bugged me. Who wants green file names glaring at you in your filing system? I even dislike file labels on MacOS, I don’t use them, but I have to put up with coworkers that do.
 
I've seen this happen with files that come from my friend's Mac, too. Curiously, this only happens if the version of Windows you have supports encryption (the Home Editions of Windows don't encrypt them). My guess from that is that the Mac is setting a bit somewhere in the ZIP's metadata that Windows interprets as instruction to encrypt at extraction, but that is my speculation only. I have not figured out or found an answer to this.

A link I found in a cursory search.

[Edit: I see Danger Mouse has the same theory as well]
 

TangleWeb

Ars Tribunus Angusticlavius
7,387
Moderator
Courtesy of RobL777;

From the H.T.F.C. Forums; Green Filenames - Why?

The fact that the files are encrypted in the first place appears to be a
bug/feature of Vista's built-in extractor when dealing with files compressed
in OS X with OS X's built-in GUI compression utility

This issue can be easily recreated. Take any file on a Mac running OS X
10.4.x or higher (I've been unable to test this with earlier versions of OS
X) and Ctrl-click/Right-Click on it and choose 'Compress "Filename".

Then move that file to a PC running Windows Vista with all current updates
and no additional extraction software (i.e. no WinZip or WinRAR).

In Vista, right-click on the file and choose 'Extract All...' Vista extracts
the file(s) to a folder with the same name as the compressed file, the files
contained in the folder have green filenames indicating they are encrypted.
Vista's extractor encrypts the files during the extraction process.
Examining the properties of the file shows me that the account associated
with the encryption is vista_user(vista_user@vista_machine_name).

It's easy enough to remove the encryption by right clicking and modifying
the attributes. This only occurs with files compressed in OS X and extracted
with Vista's built-in extractor. This does not occur if WinZip or WinRAR is
used to extract the files on the Vista machine or with XP's built-in
extractor. This also does not occur the OS X command-line zip utility is
used to compress the file(s). The command line-utility does not include the
HFS metadata for the compressed files that the GUI compression utility does
include. It seems that if Vista's extractor sees that data it decides that
it needs to encrypt the files it's extracting.
 

RobL777

Well-known member
9,074
Dave, thanks for posting that bit of research I did on this issue. I thought Ardax covered the main point in it when he said this:

"Well, for encryption it's easy enough. Bring up the properties for the files/folders that are encrypted, click "Advanced" and uncheck the encryption checkbox."

The H.T.F.C. forums post does show that this issue has been around since Vista, and remains as an issue in Win 7 as well.

The other work-around that the thread post mentions is not one everyone will have available to them: use Mac's command-line to make your Mac zip files. Apparently, when made this way, and opened in Vista, the files remain unencrypted.
 

Valkyrie Millia

Ars Scholae Palatinae
998
I remembered to screw around with this when I got a chance.

Yeah, Ardax was spot on and I made this thread slightly more confusing than it needed to be, mainly because I was replaying the topic in my mind while not sitting in front of my Vista install.

Long ago, when I first encountered the issue I tired opening the property of the file and playing under the security tab with permissions and not getting very far. But yeah, permissions aren’t encryptions and I sort of had the two terms mushed together in my mind.

Anyway, thanks for the original inquiry me2, and thanks for the click-able solution Ardax, TangleWeb and others who looked into the issue.
 
Status
Not open for further replies.