Skip to content

Commit

Permalink
fix: Permissions for Argo CD repo server
Browse files Browse the repository at this point in the history
Fixed the directory permissions for the Argo CD
repo server.

Contributes to:  automation-saas/native-AWS#2081

Signed-off-by: Sujeily Fonseca <sujeily.fonseca@ibm.com>
  • Loading branch information
sujeilyfonseca committed Jul 9, 2022
1 parent 6f27974 commit c80bd09
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ replace (
github.com/Masterminds/goutils => github.com/Masterminds/goutils v1.1.1 // indirect
github.com/docker/distribution => github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.12.2
go.mongodb.org/mongo-driver => go.mongodb.org/mongo-driver v1.9.1 // indirect
golang.org/x/crypto/ssh => golang.org/x/crypto/ssh v0.0.0-20220622213112-05595931fe9d
golang.org/x/net => golang.org/x/net v0.0.0-20220708220712-1185a9018129
gopkg.in/square/go-jose.v2 => gopkg.in/square/go-jose.v2 v2.6.0 // indirect
Expand Down
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1125,9 +1125,6 @@ go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lL
go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE=
go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc=
go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4=
go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.9.1 h1:m078y9v7sBItkt1aaoe2YlvWEXcD263e1a4E1fBrJ1c=
go.mongodb.org/mongo-driver v1.9.1/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
Expand Down
2 changes: 1 addition & 1 deletion reposerver/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ func (s *Service) newHelmClientResolveRevision(repo *v1alpha1.Repository, revisi
// a function that can be used to remove all permissions.
func directoryPermissionInitializer(rootPath string) goio.Closer {
if _, err := os.Stat(rootPath); err == nil {
if err := os.Chmod(rootPath, 0600); err != nil {
if err := os.Chmod(rootPath, 0700); err != nil {
log.Warnf("Failed to restore read/write/execute permissions on %s: %v", rootPath, err)
} else {
log.Debugf("Successfully restored read/write/execute permissions on %s", rootPath)
Expand Down

0 comments on commit c80bd09

Please sign in to comment.