Opinion by
Green, C.:The plaintiffs, in the court below, applied for a writ of mandamus to require the defendant, who was the sheriff of Labette county, to publish a certain notice of a sale of real estate in the Oswego Independent. Having paid the publisher the fee for such notice and taken a receipt therefor, they presented the same to the sheriff with the request that he publish said notice in said newspaper. The sheriff refused, assigning as a reason the right to decide for himself where he would publish his legal notices. The court below held that the plaintiffs were not entitled to the writ.
Section 457 of the code prescribes that lands taken on execution shall not be sold until the officer causes public notice of the time and place of sale to be given, for at least thirty days before the day of sale, by advertisement in some newspaper printed in the county. Section 460 gives authority to the officer to refuse to publish such notice until the party for whose benefit the process issues advances to such officer money sufficient to pay for such publication. Under this authority for publishing legal notices, can the party asking for the process require the sheriff to make the publication in such newspaper as he may select? While it is generally true that it is *147the duty of the sheriff to act upon the orders of the party in whose favor the process is issued, still we do not think he can be controlled to the extent of the plaintiff’s saying where he shall publish his notices. He is an officer of the court. Certain statutory requirements are enjoined. The duty of making the publication is cast upon him. Now when he is willing to perform that duty and make the publication in a newspaper printed in the county, can he still be required, by one of the extraordinary remedies of the court, to publish the notice in a paper to be selected by the plaintiffs ? There is nothing in the writ to show that he had failed to perform any duty'enjoined upon him by law. It should be borne in mind, too, that to entitle the plaintiffs to such a writ, it must clearly appear that they had the legal right to have this thing done. There was no refusal, upon the-part of the sheriff, to do his duty in regard to the sale and the notice. The statute says the lands and tenements shall not be sold until the officer causes notice to be published in some newspaper. He alone is charged with this statutory duty of giving public notice of the sale. He signs this notice, and is in a measure responsible for all the steps necessary to be taken, from the time he receives the execution or order of sale until the return is made. He is the executive officer of the court, and can be held responsible for any failure, upon his part, to do his duty; but if the plaintiffs or any other party interested in the process, can direct where publication shall be made, who would be responsible if the necessary notice was not given, or the statute was not fully complied with? We think that the law imposes the duty of giving this notice of the sale of real estate upon the sheriffj and that he cannot be compelled to make publication in any newspaper the plaintiffs or other party in interest may designate. The sheriff, in making the sale, is not alone the agent of the creditor; he acts as an officer of the court for all interested in the sale. “In effecting the sale, the sheriff is the agent of the creditor, the debtor, and the purchaser, and his acts may more or less affect them all.” (Walker v. Braden, 34 Kas. 664; Farr v. Sims, Rich. Eq. Cas. 122.)
*148We think the court committed no error in refusing the writ prayed for, and therefore recommend an affirmance of the judgment.
By the Court: It is so ordered.
All the Justices concurring.