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

Tweego binary does not have "executable" attribute in the release ZIP #18

Open
ezsh opened this issue Oct 25, 2020 · 2 comments
Open

Tweego binary does not have "executable" attribute in the release ZIP #18

ezsh opened this issue Oct 25, 2020 · 2 comments
Assignees
Labels
investigate Information gathering is needed

Comments

@ezsh
Copy link

ezsh commented Oct 25, 2020

$ wget -O tweego.zip https://github.com/tmedwards/tweego/releases/download/v2.1.1/tweego-2.1.1-linux-x64.zip
$ unzip tweego.zip
$ ls -l                                                                                                                                                    ✔  6698  14:45:38  
total 7732
-rw-r--r--  1 username username    1341 Feb 24  2020 LICENSE
drwxr-xr-x  2 username username     140 Dec 23  2019 licenses
drwxr-xr-x 11 username username     220 Dec 23  2019 storyformats
-rw-r--r--  1 username username 4506940 Feb 25  2020 tweego
-rw-r--r--  1 username username 3107046 Feb 25  2020 tweego.zip

Have to apply chmod +x tweego

@Uzume
Copy link

Uzume commented Nov 5, 2020

In general this is a limitation of the zip format as it stores extremely limited attributes about the original file (as it was originally only designed for MS-DOS file attributes). That said some zip programs allow storing some POSIX/Unix-style permissions in the optional extended attributes that can be saved in zip archives, however, how to set these and how compatible they are across zip clients is undefined (and so may not be compatible across different zip clients).

I am assuming @ezsh is using infozip. Using infozip one can query these extended attributes via unzip -Z tweego.zip (-Z causes infozip unzip to act like infozip zipinfo). This can be limited to specify files within the archive. As an example (and to keep from spamming lots of data here), executing unzip -Z tweego.zip tweego to examine these extended attributes for only the tweego executable within the released zip archive, I get:

-rw-a--     6.3 fat  4506940 bx defN 20-Feb-25 01:09 tweego

It does not appear as if the released archives are storing such extended attribute information--or at least not in a format that infozip seems to understand.

If I use the infozip tools to unzip the archive, set the executable permission bit on the executable file and rezip the files, effectively recreating the zip archive, and then execute the same command, I now get:

-rwxr-xr-x  3.0 unx  4506940 bx defN 20-Feb-25 01:09 tweego

For reference if it matters, I am using infozip tools from/on Ubuntu focal in WSL2 on Windows 10.

If this is a concern for the tweego release process, I recommend switching the POSIX/Unix binary releases to different archive formats (e.g., a compressed tar archive, etc.).

@tmedwards tmedwards self-assigned this Nov 6, 2020
@tmedwards tmedwards added the investigate Information gathering is needed label Nov 6, 2020
@mcdemarco
Copy link

I also noticed this on macOS (12.6) with tweego 2.1.1 (64bit). I don't recall having the problem with previous versions of tweego, but it's been a while since I installed one. I also don't have a general issue with executables unzipping to non-executables; this is the first time I've seen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Information gathering is needed
Projects
None yet
Development

No branches or pull requests

4 participants