Change windows default permissions to 755 not 711, read access for all poses little security risk and prevents breaking existing Dockerfiles

Signed-off-by: Mitch Capper <mitch.capper@gmail.com>
This commit is contained in:
Mitch Capper 2015-03-15 10:19:15 -07:00
parent 18332a6073
commit 1a26dcf2cb
2 changed files with 7 additions and 8 deletions

View file

@ -28,10 +28,9 @@ func CanonicalTarNameForPath(p string) (string, error) {
// chmodTarEntry is used to adjust the file permissions used in tar header based
// on the platform the archival is done.
func chmodTarEntry(perm os.FileMode) os.FileMode {
// Clear r/w on grp/others: no precise equivalen of group/others on NTFS.
perm &= 0711
perm &= 0755
// Add the x bit: make everything +x from windows
perm |= 0100
perm |= 0111
return perm
}