Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to package my application for linux, I use zip/tar.gz/7z/rar to do the compress in Windows.

Because I do the compress in Windows, so when I extract the package in Linux, the file permission is reset.

The problem is Only the tar.gz can let me extract runable files, other format (zip/7z/rar) not (the file permission is reset to 644).

So my question is how to compress my files using zip/7z/rar while reset the permission to 755.

share|improve this question
up vote 1 down vote accepted

As far as I know, zip and rar do not store permissions, I guess 7z also doesn't do it on Windows.

So you can't actually "set" the permisisons while compressing in these formats. I'd suggest using a tar based archive for linux targets. If you absolutely need zip or rar, consider using a script that calls chmod after unpacking.

share|improve this answer

Zip does support *nix permissions, but there is no tool under Windows that lets you set them arbitrarily. It is possible to write a Python script that can set them though.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.