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

Fix: make sure all extracted tarballs are r/w enabled #4301

Merged
merged 3 commits into from Sep 4, 2017
Merged

Conversation

BYK
Copy link
Member

@BYK BYK commented Sep 4, 2017

Summary

Fixes: #992. This issue was supposed to be fixed by #2826 but it
was not setting directory permissions wide enough. This patch uses
the readable and writable options provided by the tar-fs
package which essentially sets everything to 0o777.

Test plan

N/A

**Summary**

Fixes: #992. This issue was supposed to be fixed by #2826 but it
was not setting directory permissions wide enough. This patch uses
the `readable` and `writable` options provided by the `tar-fs`
package which essentially sets everything to `0o777`.

**Test plan**

N/A
@BYK BYK requested a review from arcanis September 4, 2017 14:58
@BYK
Copy link
Member Author

BYK commented Sep 4, 2017

@BYK BYK added this to Awaiting Review in Yarn 1.0 Sep 4, 2017
@arcanis
Copy link
Member

arcanis commented Sep 4, 2017

Why not using the regular dir 0o755 / file 0o644? Using 777 looks quite dangerous.

@BYK
Copy link
Member Author

BYK commented Sep 4, 2017

Why not using the regular dir 0o755 / file 0o644? Using 777 looks quite dangerous.

That's fair. Honestly, I just wanted to use the named options instead of Unix file permission codes, that's why. If you think this is unsafe, I can change it. Actually, I can imagine a scenario where a private package should not be readable by other users so I'll go ahead and use your suggestion instead.

@arcanis arcanis merged commit de7cefc into master Sep 4, 2017
@arcanis arcanis moved this from Awaiting Review to Done in Yarn 1.0 Sep 4, 2017
joaolucasl pushed a commit to joaolucasl/yarn that referenced this pull request Oct 27, 2017
* Fix: make sure all extracted tarballs are r/w enabled

**Summary**

Fixes: yarnpkg#992. This issue was supposed to be fixed by yarnpkg#2826 but it
was not setting directory permissions wide enough. This patch uses
the `readable` and `writable` options provided by the `tar-fs`
package which essentially sets everything to `0o777`.

**Test plan**

N/A

* fewer perms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Windows fails with EPERM: operation not permitted, all files are read-only
2 participants