hello stackoverflowers,

I want to preserve the original file permissions when using Python's tarfile module.
I have quite a few executable files that lose their permissions once the tarball is extracted.

I'm doing something like this:

```
import tarfile
tar = tarfile.open("mytarball.tar.gz", 'w:gz')
tar.add('my_folder') #tar the entire folder 
tar.close()

```

Then I copy it from windows to a linux machine (mapped with samba) using shutil:

```
shutil.copy("mytarball.tar.gz",unix_dir)

```

Then, to extract the tarball in linux I do 

```
unix>tar -xvf mytarball.tar.gz  

```

After the tarball is extracted I lose all the 'x' permissions on my files

Any clues how to solve this issue?

Regards