Paterson, J.
— On October 2, 1888, the defendants Booty and Holmes entered into an agreement with the defendant the county of Santa Barbara, to erect for the latter, on a public block in the city of Santa Barbara, a brick building, to be used by the county as a hall of records, for the sum of $19,850. The contract was reduced to writing, but was never signed by any officer of the county. Thereafter, defendant the Star Brick and Supply Company, began the construction of the building under a contract with Booty and Holmes, and prosecuted the same until August, 1889, when Booty and Holmes assumed control of the work, which was completed by them and turned over to and accepted by the county on September 11, 1889. Plaintiffs and their assignors performed services and furnished materials under contracts made with the Star Brick and *545Supply Company while the latter was engaged in constructing the building, and it is for the value of such services and materials that this action was brought. During the progress of the work the county paid to Booty and Holmes, on account of the contract price, the sum of $11,991, leaving a balance of $7,859 due at the time the building was completed. Soon after the completion of the work, plaintiffs served upon the proper county officers notices in writing of their respective demands, and thereupon the board of supervisors passed a resolution reserving the balance of the contract price for the satisfaction of all claims and liens. Notices in the form required by section 1187 of the Code of Civil Procedure were filed in due time in the office of the county recorder by the plaintiffs. On January 4, 1890, plaintiffs filed their claims against the county with the clerk of the board, setting forth the facts required by the provisions of the county and township government act, and the board refused to pay the same, or any of them, until the claims were established by the judgment of a court of competent jurisdiction. Thereupon this action was commenced against the county of Santa Barbara for the sums of $6,551.73, value of the work done and materials furnished by plaintiffs; $37.40, cost of filing and recording the notices of lien; and $850, attorney’s fees. Upon the application of the county, the defendants Booty and Holmes, original contractors, and the Brick and Supply Qompany, subcontractors, were brought in and made parties defendant.
The court found, as conclusions of law, that the several plaintiffs were entitled to recover judgment against the county of Santa Barbara, in accordance with the rank of their respective claims, — specifying the rank of each, — the amount to which they were entitled, together with interest thereon, costs, and an attorney fee of thirty dollars for each claimant, the same to be paid out of the balance of $7,859 set aside for that purpose by the board *546of supervisors; that the claims of Booty and Holmes and the Brick and Supply Company were all subordinate and subject to the claims of the plaintiffs; that in case the fund was insufficient to pay the amounts found due, plaintiffs would be entitled to judgment against the defendant the Brick and Supply Company for the deficiency; and that plaintiffs were entitled to a lien on the hall of records. Judgment followed in accordance with the conclusions of law, except that no lien was declared therein against the building. The county was satisfied with the judgment, and paid the claims as directed by it. The defendants Booty and Holmes and the Brick and Supply Company appealed, bringing the case before us on the judgment roll alone.
Appellants’ contention that a lien cannot be acquired against a public building is sustained by the authorities (Phillips on Mechanics’ Liens, sec. 179; Code Civ. Proc., sec. 690, subd. 13; Ripley v. Gage Co., 3 Neb. 397; 2 Dillon on Municipal Corporations, sec. 577; Foster v. Fowler, 60 Pa. St. 27; Poillon v. Mayor of New York, 47 N. Y. 666; Mayhofer v. Board of Education, 89 Cal. 110); but it does not follow that the claims of Booty and Holmes are not subordinate and subject to the claims of the plaintiffs, so far as the unpaid portion of the contract price is concerned. Under section 1184 of the Code of Civil Procedure, the mechanic or material-man may give the owner of the building upon which he has performed labor or for which he has furnished material written notice of hi* claim, and thereupon it becomes the duty of such owner to retain sufficient funds to answer such claim. Upon receipt of the notice the owner becomes liable as oh garnishment or assignment. (McAlpin v. Duncan, 16 Cal. 128.) “It is a form of equitable subrogation regulated by statute.” (Loonie v. Hogan, 9 N. Y. 439, 440; Frank v. Chosen Freeholders, 39 N. J. L. 347; 2 Jones on Liens, sec. 1285.) The rights of plaintiffs do not depend upon *547the legality of the contract. Whether it was void or valid, the contractor and subcontractor will be held to be the agent of the owner for the purposes of the law, and neither the one nor the other can assert a want of privity between himself and the laborer or material-man. The right of plaintiffs to recover does not depend upon their right to a lien. The equitable garnishment provided for by section 1184 of the Code of Civil Procedure is a cumulative remedy in ordinary cases; but in this instance, it is the only remedy provided by the lien law, because the pursuit of the remedy by foreclosure would involve the taking of buildings which, on the grounds of public policy and public necessity, are exempt from execution and forced sale. And this remedy is one which does not contravene any principle of public policy. It operates merely as an assignment pro tanto of the money due by the owner to the contractor, and in no way affects the public buildings. The fund is in the treasury, and the statute justly provides that instead of paying it to the contractor for the work which he agreed to do, but which the laborer has actually performed, the owner shall pay it to the latter. The true spirit and merit of the statute is lost sight of in the contention that this remedy is a mere substitute for the remedy by lien, and that when the latter does not exist, the former cannot exist. The right to control and direct the funds remaining in the hands of the owner is as distinct and independent as the right to file and enforce a lien. It is a remedy entirely disconnected from and additional to the remedy by lien upon the building; and as the exceptional element which it is claimed arrests in this case the usual operation of the lien law does not exist, it is a remedy which should be regarded with favor by the court.
The Brick and Supply Company was primarily liable to plaintiffs for their respective claims, and cannot be heard to complain of the deficiency judgment. The *548right to a money judgment- against the person who employs the mechanic or purchases the materials is not lost or waived by a proceeding to enforce the lien, or recover from the owner the balance of the contract price remaining in his hands. (Brennan v. Swasey, 16 Cal. 140; Germania B. & L. Ass’n v. Wagner, 61 Cal. 349; Code Civ. Proc., secs. 1194, 1197.) Furthermore, it appears that the funds held by the county are more than sufficient to pay all the demands of the plaintiffs.
The complaint contains all the allegations necessary to show a due presentation of plaintiffs’ claims against the county and the rejection thereof; but if it did not, so long as the county does not complain, we do not think appellants should be heard on such an objection.
The court erred in allowing each claimant $2.20 for filing his notice of lien and $30 attorney fee. Inasmuch as no lien could be acquired by any of the claimants, no expense incurred in attempting to secure one should have been allowed. The statute does not, in express terms, provide for counsel fees, except in cases of lien (Code Civ. Proc. secs. 1184, 1195); and of course such fees cannot be allowed, unless expressly authorized by law. (Code Civ. Proc., sec. 1021.)
The cause is remanded, with directions to modify the judgment by striking from the amounts allowed to the several claimants the sum of $32.20. As thus modified, the judgment will stand affirmed.
Harrison, J., and Garoutte, J., concurred.
Hearing in Bank denied.