
43 Cal.App.2d 538 (1941)
F. O. BUNNELL, Appellant,
v.
BASICH BROTHERS CONSTRUCTION COMPANY (a Corporation) et al., Respondents.
Civ. No. 12273. 
California Court of Appeals. Second Appellate District, Division One.  
March 18, 1941.
 L. E. Dadmun for Appellant.
 Stephen Monteleone for Respondents.
 WHITE, J.
 Plaintiff brought this action to enforce a liability allegedly created pursuant to the terms of sections 544 *539 and 545 of the Code of Civil Procedure. The facts necessary for a proper consideration of the issues involved herein are that defendant Basich Brothers Construction Company, on or about the 10th day of September, 1930, entered into a contract with the State of California through its Department of Public Works, Division of Highways, for the construction by said defendant corporation of certain highway improvements. Thereafter, on or about October 1, 1930, defendant corporation entered into a subcontract with Bakerbower Transportation Company (hereinafter referred to as the transportation company) for the performance by said transportation company of a portion of said work of highway improvement.
 On or about January 9, 1931, plaintiff in the instant cause commenced an action in the Superior Court of Los Angeles County against the transportation company, and upon the issuing of summons therein a writ of attachment was also secured. On the day of its issuance the writ of attachment was served upon Basich Brothers Construction Company, who retained said writ until January 27, 1931, when in answer to the demand therein contained the construction company made return to said writ that it did not have in its possession or under its control any money or property belonging to the defendants in the action out of which the writ of attachment arose, and that it was not indebted to either or any of the defendants therein.
 Following trial before the court, sitting without a jury, judgment was rendered in favor of defendants, and from such judgment plaintiff prosecutes this appeal.
 By the terms of the subcontract of October 1, 1930, respondent construction company was authorized by the transportation company to retain all or any portion of the moneys which might become due or owing the latter thereunder, in the event and during all times where there was due, owing and unpaid by the transportation company any sum or sums for work or labor performed, supplies, implements, vehicles, or machinery furnished in connection with the work being performed by the subcontractor, transportation company. It was also provided in the subcontract that in addition to the provisions therein contained respondent construction company was clothed with the right to withhold sufficient moneys to answer for all unpaid labor and materialmen's claims against said *540 transportation company. It was further stipulated in such subcontract that the transportation company provide a faithful performance and labor and material bond. Such bond was furnished by a surety company, and on January 13, 1931, said transportation company, finding itself financially unable to carry its subcontract to completion, assigned the same over to its surety. There is contained in the record evidence of sufficient substantiality to support the findings made by the trial court that at the time of the service of the writ of attachment on respondent construction company the latter did not have in its possession any moneys belonging to the transportation company or to which such transportation company was entitled. Also supported by the evidence is the finding of the court that at the time of the service of the writ of attachment and demand upon respondent construction company the subcontractor, transportation company, had contracted and incurred, on account of labor and materials, lienable obligations in excess of the amount of money earned by it under its subcontract, and that such obligations were not extinguished by said transportation company, but by the construction company and the surety company, by reason of which there existed an offset against said transportation company, defendant in the action instituted by appellant herein, far in excess of the amount earned by the transportation company under its contract.
 [1] We come now to a consideration of the question of whether, under the factual situation here narrated, was appellant entitled to have respondent construction company surrender, pursuant to the demand and writ of attachment, money in its possession which had been earned by the transportation company, but to the possession of which the transportation company was not entitled. It must be conceded that had the transportation company sought to recover from respondent construction company any such moneys, its efforts in that regard would have been futile, because under the terms of the subcontract respondent construction company was entitled to withhold such earnings and apply the same as it did to the liquidation of the outstanding obligations incurred but not satisfied by the subcontractor, transportation company. An attaching creditor takes only such rights or interest as his debtor has. The transportation company having no right to obtain the moneys in question, its creditor, *541 appellant herein, stands in its shoes, and has no more rights than it has. When, as here, the debtor has no right to the money in question, garnishment by the creditor is unavailing. (Walker v. Doak, 210 Cal. 30, 34 [290 P. 290].)
 By reason of the foregoing conclusion at which we have arrived, it becomes unnecessary to consider or determine other questions presented.
 The judgment is affirmed.
 York, P. J., and Doran, J., concurred.
