I think what gedamial means is, step one is to make sure that we’re talking about a replicated actor.
But to answer your question, the function AActor::SetOwner(AActor* NewOwner) when called by the server sets the actor’s owner for networking purposes. If you set an actor’s owner to a player controller, that means that player’s client can call server RPCs. You can also set the actor’s owner to another actor that is in turn owned by a player controller. As long as the actor’s owner’s owner’s owner… etc leads to a player controller, that player has net ownership of that actor. However, that isn’t the same as authority. The machine that spawned the actor is always the authority. So the server keeps authority over any actor that is replicated, even if it passes net ownership to a player.
In practise if you’re writing code that should execute only for the owning player, you can check whether the actor’s Role >= ROLE_AutonomusProxy. From the perspective of the client that has net ownership over an actor, that actor is an “autonomous proxy”: autonomous because the actor can make decisions on that client, and proxy because the real version is still on the server. Aside from managing logic, you can make variables replicate only to the owner or skip the owner. For example, UI values that only the owning player sees don’t have to be replicated to other players. On the other hand, when you have variables that are simulated by the owning client first and only then on the server (for responsiveness), you don’t want the server to replicate those values back to the owner.
A concrete example of that last point is ammo. If you’re programming a machine gun, you want to see the ammo count going down the moment you click instead of waiting for that data from the server. In that case the owning client decrements the ammo count locally, sends a request to the server to do it too, and the server replicates it to all other clients except the owning client by using COND_SkipOwner. Read more about conditional replication here: https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Actors/Properties/Conditions/