Skip to content

Commit

Permalink
Fix: make sure all extracted tarballs are r/w enabled (yarnpkg#4301)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
BYK authored and joaolucasl committed Oct 27, 2017
1 parent 3159074 commit 667c4fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fetchers/tarball-fetcher.js
Expand Up @@ -67,8 +67,8 @@ export default class TarballFetcher extends BaseFetcher {
const extractorStream = gunzip();
const untarStream = tarFs.extract(this.dest, {
strip: 1,
dmode: 0o555, // all dirs should be readable
fmode: 0o444, // all files should be readable
dmode: 0o755, // all dirs should be readable
fmode: 0o644, // all files should be readable
chown: false, // don't chown. just leave as it is
});

Expand Down

0 comments on commit 667c4fe

Please sign in to comment.