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

permissions on files inside output zip are missing (no r/w/x!) #48

Closed
ctb opened this issue Jun 7, 2024 · 2 comments · Fixed by #53
Closed

permissions on files inside output zip are missing (no r/w/x!) #48

ctb opened this issue Jun 7, 2024 · 2 comments · Fixed by #53

Comments

@ctb
Copy link
Contributor

ctb commented Jun 7, 2024

Debugging sourmash-bio/sourmash#3191, I noticed that when I unzip the test-gbsketch.zip file, the permissions on the files inside are entirely missing

ls -lR
total 8
----------  1 t  staff  1176 Jun  7  2024 SOURMASH-MANIFEST.csv
drwxr-xr-x  7 t  staff   224 Jun  7 06:24 signatures

./signatures:
total 256
----------  1 t  staff  22245 Jun  7  2024 8196cc69b814cab9fc3c7e9eed861bf6.sig.gz
----------  1 t  staff  45420 Jun  7  2024 a9a2f47091e05bf235130a97b85a0d85.sig.gz
----------  1 t  staff  15856 Jun  7  2024 d673373096c7db39957c8b4ce58aea31.sig.gz
----------  1 t  staff  15999 Jun  7  2024 de397c034304bf5f8b05c884839206d0.sig.gz
----------  1 t  staff  23316 Jun  7  2024 f54c012657c20304f8455dca3b268196.sig.gz

This doesn't actually seem to inhibit sourmash itself in any way, but it does look weird when you unpack the files 😆 .

@bluegenes
Copy link
Collaborator

Looks like I can set permissions via unix_permissions in ZipEntryBuilder https://docs.rs/async_zip/latest/async_zip/struct.ZipEntryBuilder.html

@ctb what permissions would you recommend?

@ctb
Copy link
Contributor Author

ctb commented Jun 13, 2024

The default umask on unix is usually something like

u+rw
a+r

(or whatever that translates to in octal 😉 - 644, looks like)

that seems legit, yah? could also go for 444, which I think is just a+r.

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

Successfully merging a pull request may close this issue.

2 participants