Closed
Description
I have the following file structure:
app
|--zipme
| |--data (mode 777)
| | |--foo.txt (mode 777)
If I ran the follwing code
"use strict";
const tar = require("tar");
tar.c({
gzip: true,
file: "arch.tgz",
}, ["zipme"])
.then(() => tar.x({
cwd: "x",
file: "arch.tgz",
}))
.then(() => console.log("done!"))
.catch(err => console.log(err));
the directory x/zipme/data has the mode 755 (probably because of the process umask).
When I run this code again without deleting the output dir (x/zipme) then the data directory gets the mode 777. Is this indented?
I expected the mode of the directory to be mode 777 the first time I run this code.
The same is not true for files. The mode stays unchanged on 755 regardless of how often I run this code.
Is there a way to have the modes of the tar source replicated in the output directory without changing the umask of the process?
Metadata
Metadata
Assignees
Labels
No labels