Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zip file extracted permissions are incorrect #23822

Closed
sidcarter opened this issue May 17, 2015 · 8 comments
Closed

Zip file extracted permissions are incorrect #23822

sidcarter opened this issue May 17, 2015 · 8 comments
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix help-wanted Community help is needed to resolve this P1 Priority 1 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Upstream-Bug is a result of an upstream issue, not in salt
Milestone

Comments

@sidcarter
Copy link

I'm using this state to install packer:

{% set version = '0.7.5' %}

packer:
  archive:
    - extracted
    - name: /usr/local/bin/
    - source: https://dl.bintray.com/mitchellh/packer/packer_{{version}}_linux_amd64.zip
    - source_hash: sha256=8fab291c8cc988bd0004195677924ab6846aee5800b6c8696d71d33456701ef6
    - archive_format: zip
    - if_missing: /usr/local/bin/packer

This state command itself worked fine without any issues, but then I noticed that the permissions were all wrong.

# salt --version
salt 2015.5.0 (Lithium)
# ls -l
total 318964
-rw-r--r-- 1 root root 10087048 May 17 05:47 packer
-rw-r--r-- 1 root root 10293560 May 17 05:47 packer-builder-amazon-chroot
-rw-r--r-- 1 root root 11110464 May 17 05:47 packer-builder-amazon-ebs
-rw-r--r-- 1 root root 11146448 May 17 05:47 packer-builder-amazon-instance
-rw-r--r-- 1 root root 10437344 May 17 05:47 packer-builder-digitalocean
-rw-r--r-- 1 root root  9394712 May 17 05:47 packer-builder-docker

If I extracted the zip directly, I get this:

~/test# ls -l
total 318964
-rwxr-xr-x 1 root root 10087048 Dec 10 03:17 packer
-rwxr-xr-x 1 root root 10293560 Dec 10 03:17 packer-builder-amazon-chroot
-rwxr-xr-x 1 root root 11110464 Dec 10 03:17 packer-builder-amazon-ebs
-rwxr-xr-x 1 root root 11146448 Dec 10 03:17 packer-builder-amazon-instance
-rwxr-xr-x 1 root root 10437344 Dec 10 03:17 packer-builder-digitalocean
-rwxr-xr-x 1 root root  9394712 Dec 10 03:17 packer-builder-docker

I don't know of any options I can pass to fix this. Is this a bug?

@jfindlay jfindlay added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P1 Priority 1 Platform Relates to OS, containers, platform-based utilities like FS, system based apps labels May 20, 2015
@jfindlay jfindlay added this to the Approved milestone May 20, 2015
@jfindlay
Copy link
Contributor

@sidcarter, thanks for the report.

@jfindlay jfindlay added the Regression The issue is a bug that breaks functionality known to work in previous releases. label May 21, 2015
@sebest
Copy link
Contributor

sebest commented May 21, 2015

This is a bug in python zipfile lib with extractall()
Previous version of salt was using bin/unzip
Salt should revert to using bin/unzip as default

@jfindlay
Copy link
Contributor

@sebest, do you have a reference to the upstream bug? Does one need to be filed? :-)

@jfindlay
Copy link
Contributor

This might be it: https://bugs.python.org/issue15795

@jfindlay jfindlay added Upstream-Bug is a result of an upstream issue, not in salt help-wanted Community help is needed to resolve this and removed Regression The issue is a bug that breaks functionality known to work in previous releases. labels May 21, 2015
@sebest
Copy link
Contributor

sebest commented Jun 16, 2015

Any update on this?

@sebest
Copy link
Contributor

sebest commented Jul 31, 2015

Hi, i hoped that this got fixed in 2015.5.3 , but it seems that it did not make it?

@jfindlay
Copy link
Contributor

The fix (#25185) missed 2015.5.3 by 50 commits, (git describe 1726057c8a93101b58c8e2cdb5d0d5b021dc29a6 -> v2015.5.3-50-g1726057), but will be in 2015.5.4 or 2015.8.0, whichever comes out first.

@rallytime
Copy link
Contributor

This should be fixed in the latest stable release, 2015.5.5. As such, I am going to close this issue. If this pops up again, let us know and we will be happy to re-open. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix help-wanted Community help is needed to resolve this P1 Priority 1 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Upstream-Bug is a result of an upstream issue, not in salt
Projects
None yet
Development

No branches or pull requests

4 participants