diff --git a/cmd/server-main.go b/cmd/server-main.go index e3cecbeea..e60f2ef22 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -199,9 +199,6 @@ func initServer(ctx context.Context, newObject ObjectLayer) error { globalObjectAPI = newObject globalObjLayerMutex.Unlock() - // Initialize IAM store - globalIAMSys.InitStore(newObject) - // Create cancel context to control 'newRetryTimer' go routine. retryCtx, cancel := context.WithCancel(ctx) @@ -338,6 +335,9 @@ func initAllSubsystems(ctx context.Context, newObject ObjectLayer) (err error) { logger.LogIf(ctx, fmt.Errorf("Unable to initialize config, some features may be missing %w", err)) } + // Initialize IAM store + globalIAMSys.InitStore(newObject) + // Populate existing buckets to the etcd backend if globalDNSConfig != nil { // Background this operation.