A judgment was rendered in the court below against the appellant in favor of one George A. Libby, for a trespass committed by the appellant in the unlawful seizure of certain goods and chattels belonging to said Libby. The defense interposed was that defendant seized the property, as deputy sheriff, under a writ of attachment issued against one Albert Worther, and as the property of said Worther.
Previous to the execution of the writ the appellant took a bond from the plaintiff in the attachment proceeding, to indemnify him against damages that might be in-curred in its execution.
After entry of the judgment, appellant gave written notice to the makers of the bond, as provided by statute, *33that he would, on a certain day, apply to the court for judgment on the bond in his favor, in the amount of the judgment standing against him, including costs.
The appellant’s application for judgment against the sureties was resisted by the parties who executed the bond, and upon the hearing a judgment of non-suit was entered in the cause. This appeal is from the latter judgment, and the errors assigned are, the refusal of the court to render judgment against the sureties in the bond, and the entry of the judgment of non-suit.
If the bond is void the action of the court can be sustained, otherwise the errors are well assigned.
It is a proper practice for officers into whose hands writs may come, commanding that they be levied upon personal property, to require indemnity in all cases where the ownership of the property to be seized is in dispute or doubt. In such case, if the writ he regular upon its face, and the officer acts in good faith, he will be entitled to reimbursement of all damages he may sustain, should the seizure prove to be a trespass.
The remedy upon the bond is equally availing, whether it be a statutory bond or a voluntary obligation merely, but, to be held'valid, the act to be done must not be in contravention of a statute or against the peace,. or the policy of the law.
It was said in Stone v. Hooker, 9 Cow. 155, “The distinction taken between promises of indemnity that are, and those which are not void, is this: if the act directed or agreed to be done is known at the time to be a trespass, an express promise to indemnify would be illegal and void; but if it was not known at the time to be a trespass, the promise of indemnity is a good and valid promise.”
The bond under consideration cannot be considered a statutory bond, for, although taken under color of office, no statute authorizes a sheriff to require a bond under the circumstances of this case.
*34The point to be considered, then, is-, can it be held valid as a voluntary obligation, good at common law?
In Hardesty et al. v. Price, 3 Col. 558, it was remarked that any obligation entered into voluntarily, and for a good consideration, is valid at common law, unless it contravenes the policy of the law, or is repugnant to some provision of the statute.
It is contended on part of the appellant that he acted in good faith in the execution of the writ of attachment. We are of opinion that this proposition is not supported by the facts disclosed by the record.
The writ of attachment was issued by a justice of the peace, and was directed “To any constable of said county.” This was in conformity with sections 3 and 6 of an act entitled “An act in relation to attachments issued out of justices' courts.” Laws 1819, pp. 18, 19.
The act provides for the execution of the writ by “the constable to whom the writ is delivered.''
On the subject of the execution of process, Mr. Crocker says: “No officer can execute process unless it is directed to him for service, or to the class of officers to which he belongs.” In treating of the powers and duties of constables, he says: “They alone can execute process from justices’ courts in civil actions, except in the cases where a justice may depute another person to perform such service. Crocker on Sheriffs, etc. secs. 1025, 1019.
Neither the act of 1819, to which reference has been made, nor any other statute of this state, authorizes the execution of process from justices’ courts in civil actions by sheriffs, or their deputies, as such.
■ It is not claimed that appellant acted in any other capacity than as a deputy sheriff in the transaction, or that he had any other warrant for his conduct than the writ in question, directed, as we have seen, to constables only.
The statute in relation to the powers and duties of sheriffs provides, inter alia, that “The sheriff in person, *35or by his under-sheriff or deputy, shall serve and execute according to .law, all processes, writs, precepts and orders, issued or made by lawful authority, and to him directed, and shall attend upon the several courts of record held in his county.” General Laws, sec. 496.
Had the writ been directed to the sheriff it would have been in violation of the act of 1879, requiring it to be directed to any constable, and the command to execute it would neither have conferred power nor imposed a duty upon the sheriff to execute it. Such a command could not be issued by lawful authority. But the writ having been properly directed to a different class of officers from that to which appellant belongs, his attempt to execute it was wholly inexcusable.
The writ appears to have been regular' upon its face, and in the hands of the proper' officer its execution would have entitled him to indemnity. In the hands of the appellant, however, it was void on its face, and afforded him no protection whatever. His position before the court is the same as if the seizure had been made without the writ. The claim of good faith, and that no wrong was intended, being unsupported by anything in the record, cannot be entertained.
Everyone is presumed to know the statute law of the state, and it must be presumed that appellant was cognizant of the fact that he was about to commit an unlawful act at time of taking the indemnity. He occupies the position now, therefore, of one who founds his course of action upon an illegal act known to be such when committed.
Bonds of indemnity executed under such circumstances, being against the peace, and policy of the law, are illegal and void. 1 Waterman on Trespass, sec. 29; Purple v. Purple, 5 Pick. 226; Cumpston v. Lambert, 18 Ohio, 81; Adams v. Jarvis, 4 Bing. 66; Nelson v. Cook, 17 Ill. 443,
The judgment must be affirmed.
Affirmed.