diff --git a/internal/frostfs/frostfs.go b/internal/frostfs/frostfs.go index ab7a1e70..95630aca 100644 --- a/internal/frostfs/frostfs.go +++ b/internal/frostfs/frostfs.go @@ -237,6 +237,12 @@ func (x *FrostFS) CreateObject(ctx context.Context, prm layer.PrmObjectCreate) ( obj.SetAttributes(attrs...) obj.SetPayloadSize(prm.PayloadSize) + if prm.BearerToken == nil && prm.PrivateKey != nil { + var owner user.ID + user.IDFromKey(&owner, prm.PrivateKey.PublicKey) + obj.SetOwnerID(&owner) + } + if len(prm.Locks) > 0 { lock := new(object.Lock) lock.WriteMembers(prm.Locks)