Skip to content

Commit

Permalink
update file permissions to read/write
Browse files Browse the repository at this point in the history
  • Loading branch information
meyerjrr committed Sep 19, 2024
1 parent b114bb5 commit 188c9f0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pkg/cfaws/ssotoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
)

const (
// permission for user to read/write/execute.
USER_READ_WRITE_PERM = 0700
// permission for user to read/write.
USER_READ_WRITE_PERM = 0644
)

type SSOPlainTextOut struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func SetupConfigFolder() error {
return err
}
if _, err := os.Stat(grantedFolder); os.IsNotExist(err) {
err := os.Mkdir(grantedFolder, 0700)
err := os.Mkdir(grantedFolder, 0644)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/frecency/frecency.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func Load(fecencyStoreKey string) (*FrecencyStore, error) {

// check if the providers file exists
if _, err = os.Stat(c.path); os.IsNotExist(err) {
err := os.MkdirAll(configFolder, 0700)
err := os.MkdirAll(configFolder, 0644)
if err != nil {
return nil, err
}
Expand Down
5 changes: 0 additions & 5 deletions pkg/granted/registry/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ import (
"github.com/urfave/cli/v2"
)

const (
// permission for user to read/write/execute.
USER_READ_WRITE_PERM = 0700
)

var AddCommand = cli.Command{
Name: "add",
Description: "Add a Profile Registry that you want to sync with aws config file",
Expand Down
5 changes: 5 additions & 0 deletions pkg/granted/registry/ini.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import (
"gopkg.in/ini.v1"
)

const (
// permission for user to read/write/execute.
USER_READ_WRITE_PERM = 0644
)

// Find the ~/.aws/config absolute path based on OS.
func getDefaultAWSConfigLocation() (string, error) {
h, err := os.UserHomeDir()
Expand Down

0 comments on commit 188c9f0

Please sign in to comment.