In an action against a sheriff or other officer for the recovery of property taken under an execution or rent attachment the court may, upon the application of the defendant and of the party in whose favor the execution or rent attachment is issued, permit the latter to be substituted as the defendant, security for the costs being given.
KRS 426.615