Skip to content

Commit

Permalink
Merge pull request #1153 from rahulgrover99/fix/directory-permissions…
Browse files Browse the repository at this point in the history
…-0750

Change directory permissions to 0750.
  • Loading branch information
jromero authored May 4, 2021
2 parents 11a04de + c385c34 commit 88c3455
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/blob/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (d *downloader) handleFile(path string) string {
func (d *downloader) handleHTTP(ctx context.Context, uri string) (string, error) {
cacheDir := d.versionedCacheDir()

if err := os.MkdirAll(cacheDir, 0755); err != nil {
if err := os.MkdirAll(cacheDir, 0750); err != nil {
return "", err
}

Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func Write(cfg Config, path string) error {
}

func MkdirAll(path string) error {
return os.MkdirAll(path, 0777)
return os.MkdirAll(path, 0750)
}

func SetRunImageMirrors(cfg Config, image string, mirrors []string) Config {
Expand Down
2 changes: 1 addition & 1 deletion internal/registry/registry_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func (r *Cache) writeEntry(b Buildpack) (string, error) {
}

if _, err := os.Stat(index); os.IsNotExist(err) {
if err := os.MkdirAll(filepath.Dir(index), 0755); err != nil {
if err := os.MkdirAll(filepath.Dir(index), 0750); err != nil {
return "", errors.Wrapf(err, "creating directory structure for: %s/%s", ns, name)
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion testhelpers/testhelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ func writeTAR(t *testing.T, srcDir, tarDir string, mode int64, w io.Writer) {

func RecursiveCopyNow(t *testing.T, src, dst string) {
t.Helper()
err := os.MkdirAll(dst, 0755)
err := os.MkdirAll(dst, 0750)
AssertNil(t, err)

fis, err := ioutil.ReadDir(src)
Expand Down

0 comments on commit 88c3455

Please sign in to comment.