
18 Cal.2d 256 (1941)
RAY H. KINNISON, Respondent,
v.
GUARANTY LIQUIDATING CORPORATION (a Corporation), Appellant.
L. A. No. 17849. 
Supreme Court of California. In Bank.  
July 23, 1941.
 Geo. W. Fenimore for Appellant.
 Bettin & Wait, and Bettin, Painter & Wait for Respondent.
 Morrison, Hohfeld, Foerster, Shuman & Clark, as Amicus Curiae, on behalf of Respondent.
 GIBSON, C.J.
 The Guaranty Liquidating Corporation (hereafter called defendant) brings this appeal from a judgment in favor of the plaintiff. Defendant, the owner of a judgment in excess of $26,000 against the Bartlett Syndicate Building Corporation (hereafter called Bartlett Corporation), levied a writ of execution upon the bank accounts, moneys and credits of the judgment debtor, Bartlett Corporation, which were in the possession of the Farmers & Merchants National Bank of Los Angeles. The bank made a return stating that it was indebted to Bartlett Corporation in the amount of $4,041.09. This sum was thereafter remitted to the Marshal of the Municipal Court of the City of Los Angeles, who paid the money, less his charges, to defendant. The plaintiff, as assignee of the Pacific Mutual Life Insurance Company (hereafter called Pacific Mutual), brought this action against defendant to recover the sum of $3,997.09, asserting that Pacific Mutual had a prior right to the funds of the debtor, Bartlett Corporation, to that extent.
 Plaintiff's claim of a prior right is based upon certain transactions which took place between Bartlett Corporation and Pacific Mutual. In December, 1928, Pacific Mutual made a loan of $835,000 to Bartlett Corporation for the purpose of erecting a building, and a deed of trust was executed upon the property as security for the loan. This deed of trust was released and a new one was executed on February 17, 1932, while Bartlett Corporation was in default under the terms of the original deed of trust. Contemporaneously with the execution of each deed of trust Bartlett Corporation executed an assignment of the rents from the theater which was built on the property, as additional security for the performance of its obligations. On December 28, 1933, while Bartlett Corporation was again in default under the terms of the deed of *259 trust, an instrument was executed upon which plaintiff bases his claim of a prior right to the funds of Bartlett Corporation which were on deposit with the bank. This instrument assigned to Pacific Mutual all the rents, issues and profits accruing from all the real property covered by the deed of trust, including office and store rents as well as the theater rent which had previously been assigned as further security when the deed of trust was executed. This last assignment of rentals was recorded on January 12, 1934, and at the same time a separate agreement was entered into providing that Bartlett Corporation should thereafter collect all of the rental income assigned, but specifying that such income was deemed to have been collected for the account and benefit of Pacific Mutual. After February, 1934, Bartlett Corporation collected the rentals under the terms of this special agreement and deposited the money in its general account with the Farmers & Merchants National Bank. Monthly disbursements were made to Pacific Mutual in accordance with the agreement but the account was in the name of Bartlett Corporation, and it was this account upon which defendant levied execution on February 16, 1937. The trial court found that Bartlett Corporation had collected the rentals and had deposited them on behalf of Pacific Mutual, and that, at the date of defendant's levy of execution, the sum of $3,997.09 constituted rental money belonging to Pacific Mutual under the terms of its assignment. The court also found that, prior to its levy of execution, defendant had actual and constructive knowledge of the assignment of rents from Bartlett Corporation to Pacific Mutual, of the fact that Bartlett Corporation was collecting the rentals on behalf of Pacific Mutual and under authority from it, and of the fact that the sum of $3,997.09 actually belonged to Pacific Mutual although the account stood in the name of Bartlett Corporation. On the basis of these findings the court gave judgment for the plaintiff in the sum of $3,997.09, and from that judgment the defendant brings this appeal.
 [1a] It is the general rule that an attaching creditor, seeking to subject the property of a debtor to the payment of his debt, obtains a lien only upon the title or interest which the debtor has in the particular property at the time of the levy. Thus, if all the title and interest of the debtor has been assigned to a third person, the attaching creditor gets nothing *260 by virtue of his levy. (National Bank of the Pacific v. Western Pac. Ry. Co., 157 Cal. 573, 576 [108 P. 676, 21 Ann. Cas. 1391, 27 L.R.A. (N. S.) 987]; Spear v. Farwell, 5 Cal.App.2d 111 [42 PaCal.2d 391]; see O'Rourke v. O'Connor, 39 Cal. 442; 11 Cal.Jur. 70, et seq.; Ward v. Waterman, 85 Cal. 488, 507 [24 P. 930].) It is contended, in support of the judgment below, that the assignment of December 28, 1933, operated in the present case to transfer the entire interest of Bartlett Corporation in the rentals to Pacific Mutual. Therefore, it is said, Bartlett Corporation had no interest which was subject to a levy of execution by defendant, the judgment creditor.
 [2] The common law doctrine which entitled a mortgagee to possession of the mortgaged property has no application in states where the mortgagee has merely a lien as security for his debt. (Dutton v. Warschauer, 21 Cal. 609 [82 Am. Dec. 765].) It is established in this state, therefore, that the mortgagor is entitled to possession of the mortgaged property (Code Civ. Proc., sec. 744; Civil Code, sec. 2927; 17 Cal.Jur. 1010; see 1 Jones, Mortgages [8th ed. 1928], sec. 22) and to the rents accruing from such property. (Freeman v. Campbell, 109 Cal. 360 [42 P. 35]; Belcher v. Aaron, 8 Cal.2d 180, 182 [64 PaCal.2d 402]; Casey v. Doherty, 116 Cal.App. 42 [2 PaCal.2d 495].) No distinction is to be made in this regard between mortgages and deeds of trust; the possessory rights of trustors have been held to be the same as those of mortgagors. (Snyder v. Western Loan & Bldg. Co., 1 Cal.2d 697 [37 PaCal.2d 86]; Meadows v. Snyder, 209 Cal. 270 [286 P. 1012]; 25 Cal.Jur. 41, 42.) It has been recognized, however, that the possessory rights of the mortgagor or trustor during the period of the mortgage or deed of trust may be the subject of a special agreement between the mortgagor and mortgagee or between the trustor and trustee. (Title Guarantee & Trust Co. v. Monson, 11 Cal.2d 621, 627 [81 PaCal.2d 944]; Snyder v. Western Loan & Bldg. Co., supra; Mines v. Superior Court, 216 Cal. 776 [16 PaCal.2d 732]; Sacramento & Placerville R. R. Co. v. Superior Court, 55 Cal. 453; Freeman v. Campbell, supra.) Provisions granting to the mortgagee the right to collect the rents in the event of default are often incorporated in the terms of the mortgage or deed of trust, and they are sometimes the subject of an independent contract between the parties. (Snyder v. Western Loan & Bldg. Co., supra; Pomona Mutual, etc. Assn. v. Smith, *261 18 Cal.App.2d 509 [64 PaCal.2d 444]; Fisher v. Norman Apts., Inc., 101 Colo. 173 [72 PaCal.2d 1092]; Harris v. Lesster, 35 App. Div. 462 [54 N.Y. Supp. 864]; Farmers' Trust Co. v. Prudden, 84 Minn. 126 [86 N.W. 887].)
 [3] Where the mortgage or deed of trust contains a clause which merely includes the rents as a portion of the property pledged to secure the debt, courts have generally held that the mortgagee acquires only a security interest and has no more right to the rents than he has to the real property. In such circumstances it is well settled that the mortgagee must actually acquire possession of the mortgaged property by consent or lawful procedure or must secure the appointment of a receiver in order to perfect his claim to the rents. (Freeman v. Campbell, supra; Simpson v. Ferguson, 112 Cal. 180, 185 [40 P. 104, 44 P. 484, 53 Am.St.Rep. 201]; Bank of America v. Bank of Amador County, 135 Cal.App. 714, 721 [28 PaCal.2d 86]; Freedmans' Savings & Trust Co. v. Shepherd, 127 U.S. 494 [8 S.Ct. 1250, 32 L.Ed. 163]; Long v. W. P. Devereux Co., 87 Mont. 198 [286 P. 402]; Myers v. Brown, 92 N. J. Eq. 348 [112 Atl. 844]; Sullivan v. Rosson, 223 N.Y. 217 [119 N.E. 405, 4 A.L.R. 1400]; 2 Jones, Mortgages [8th ed. 1928], sec. 827; 55 A.L.R. 1020, 1022; 87 A.L.R. 625, 628; 91 A.L.R. 1217, 1221.) The agreement between the parties, however, either by a clause inserted in the deed of trust or mortgage or by a separate instrument, may provide that in the event of default the rents are assigned absolutely to the mortgagee. It has been held that such a provision, rather than pledging the rents as additional security, operates to transfer to the mortgagee the mortgagor's right to the rentals upon the happening of the specified condition. (Paramount Bldg. & Loan Assn. v. Sacks, 107 N. J. Eq. 328 [152 Atl. 457]; Grannis-Blair Audit Co. v. Maddux, 167 Tenn. 297 [69 S.W. (2d) 238]; see Franzen v. G. R. Kinney Co., 218 Wis. 53, 56 [259 N.W. 850, 105 A.L.R. 740]; Harris v. Lesster, supra.) In some jurisdictions, however, courts have refused in certain cases to give effect to clauses of assignment either upon the theory that the mortgagee can acquire the rights flowing from possession only in the manner provided by statute (Rives v. Mincks Hotel Co., 167 Okla. 500 [30 PaCal.2d 911]; Western Loan & Bldg. Co. v. Mifflin, 162 Wash. 33 [297 P. 743]) or upon the theory that the courts are reluctant to find that a complete transfer of the mortgagor's possessory rights was intended despite the use of *262 language of assignment rather than hypothecation. (Fisher v. Norman Apts., Inc., supra; Sullivan v. Rosson, supra; Prudential Ins. Co. v. Liberdar Holding Co., 74 Fed.2d 50, 52; One Hundred Forty-Eight Realty Co. v. Conrad, 125 Misc. 142 [210 N.Y. Supp. 400]; 47 Yale L. J. 1000, 1001; 2 Jones, Mortgages [8th ed. 1928], sec. 976.) Our decisions have indicated, however, in accord with the better view, that the parties to a mortgage or deed of trust may contract respecting the right to rentals and that such agreements will be enforced in accordance with the expressed intention of the parties. (Title Guarantee & Trust Co. v. Monson, supra; Snyder v. Western Loan & Bldg. Co., supra; Silverstein v. Oakland Title Ins. etc. Co., 122 Cal.App. 23 [9 PaCal.2d 846]; Pomona Mut., etc. Assn. v. Smith, supra; cf. Long Is. Bond, etc. Co. v. Brown, 171 Misc. 15 [11 N.Y. SupP.2d 793, 797]; see Abelow, "Historical Analysis of Assignments of Rent," 6 Brooklyn L. Rev. 25, 41; 47 Yale L. J. 1000; 50 Harv. L. Rev. 1322.) Whether the agreement between the parties is incorporated in the mortgage or deed of trust or whether it is in the form of a separate instrument is not controlling; the decisive question is whether the parties contemplated an assignment of the rentals or merely a pledge of the rentals for security purposes. (See Paramount Bldg. & Loan Assn. v. Sacks, supra; 47 Yale L. J. 1000.)
 [4] In the present case we do not see how it can be said that the parties contemplated merely the transfer of a security interest in the rentals. The instrument by which Bartlett Corporation transferred its right to Pacific Mutual provides:
 "Whereas, Bartlett Syndicate Building Corporation, Ltd., a California corporation ... is the owner of that certain real property ... described as follows ... and"
 "Whereas, all leases ... are hereinafter referred to as the 'Hollywood leases'; and"
 "Whereas, all rentals ... due ... to Bartlett ... under all or any of said Hollywood leases ... (excepting only any rental ... which is paid after all of the indebtedness and obligations secured by said trust deed have been fully paid and performed) are hereinafter referred to as the 'property income';"
 "Now, therefore ... Bartlett hereby (1) grants, transfers, assigns and sets over to the Pacific Mutual Life Insurance *263 Company of California ... said property income, together with the right to collect and/or compromise the same in whole or in part and/or to enforce the payment of all or any part thereof ... as the insurance company may deem proper. ..."
 This instrument was recorded and the trial court found that Pacific Mutual had notified the tenants under the leases that the rents had been assigned to it by Bartlett Corporation. Such an assignment cannot be said to have contemplated the transfer of a mere security interest. The instrument is phrased as a complete transfer of Bartlett Corporation's interest in the rentals. Thus, there is no provision for a continued enjoyment of the rents by the debtor so long as no default exists in the obligation secured. Nor is there any indication that, by meeting the obligations then due, Bartlett Corporation could have regained its right to receive the rents. Rather, the rents were relinquished completely, to be applied by Pacific Mutual in satisfaction of the total outstanding indebtedness. This was not an assignment as further security for the performance of Bartlett Corporation's obligations, but was an attempt to liquidate the debt upon which Bartlett Corporation had been in default for at least eight months at the time the assignment was executed. Unlike the rental assignments accompanying the deeds of trust executed in 1928 and 1932, this assignment contemplated an immediate application of the rentals as a means of satisfying the total outstanding debt. It follows that the cases relied upon by defendant in seeking a reversal are not controlling. They deal with the requirements of possession necessary to constitute the mortgagee a "mortgagee in possession" where he holds only a security interest in the rentals. In the present case, on the other hand, the plaintiff's assignor, Pacific Mutual, held not merely a security interest in the rentals but an absolute assignment of Bartlett Corporation's interest therein.
 [1b, 5] It is well settled that where a creditor seeks by judicial process to attach the property of his debtor to satisfy the debt, he acquires only the interest which the debtor actually possesses. Such an attaching creditor is in the position of a purchaser with notice, and it has been held that his lien is subject to any infirmities which exist in the title of his debtor. (McGee v. Allen, 7 Cal.2d 468, 473 [60 PaCal.2d 1026]; O'Rourke v. O'Connor, 39 Cal. 442; Ward v. Waterman, supra; National Bank of the Pacific v. Western Pac. Ry., *264 supra; 1 Freeman, Executions [3d ed.] 857, sec. 170; 28 C.J. 104, et seq.; 15 Cal.Jur. 1002; 11 Cal.Jur. 71.) Thus, the claim of an attaching creditor may be defeated by proof of even an equitable assignment of the debtor's interest (McIntyre v. Hauser, 131 Cal. 11 [63 P. 69]; Cannon v. Chapman, 24 Cal.App.2d 448 [75 PaCal.2d 522]; Van Orden v. Anderson, 122 Cal.App. 132, 142 [9 PaCal.2d 572]), or by a prior unrecorded conveyance of the real property of the debtor. (Ward v. Waterman, supra, p. 507; Plant v. Smythe, 45 Cal. 161.) In the case before us, therefore, the assignment of rentals from Bartlett Corporation to Pacific Mutual clearly prevents any seizure of the rents by the defendant under its subsequent levy of execution.
 [6] Under the foregoing cases it is apparent that defendant could not have garnished the rents in the hands of the tenants themselves since those rents had already been assigned to Pacific Mutual. Nor is a different result to be reached because defendant attempted to levy upon the rentals while they were on deposit in the name of Bartlett Corporation. The agreement which accompanied the assignment of rentals clearly authorized Bartlett Corporation to collect the rentals as an agent and to pay them to Pacific Mutual at stated intervals. The fact that an agent deposits the funds of his principal in a bank account which stands in the agent's name does not give the agent any interest which can be subjected to the payment of his debts. Proof that the money in fact belongs to another will defeat an attempt by the creditors of the agent to seize the deposit. (Nathan v. O'Donnell, 52 Cal.App. 390 [198 P. 1028]; Home Land & Loan Co. v. Routh, 123 Ark. 360 [185 S.W. 467, Ann. Cas. 1917C, 1142]; Packer v. Crary, 121 Iowa 388 [96 N.W. 870]; Marx v. Parker, 9 Wash. 473 [37 P. 675, 43 Am.St.Rep. 849]; Farmers', etc. Nat. Bank v. King, 57 Pa. 202 [98 Am. Dec. 215]; Morrill v. Raymond, 28 Kan. 415 [42 Am. Rep. 167]; Brown v. Maguire's, etc. Agency, 343 Mo. 336 [121 S.W. (2d) 754]; 4 Am. Jur. 719; 15 Cal.Jur. 1002.)
 [7] Defendant also urges that plaintiff should be estopped upon equitable principles from asserting title to the funds because Pacific Mutual, by permitting Bartlett Corporation to deposit the funds in its own name, created a situation which tended to deceive Bartlett Corporation's creditors as to its true financial position. Defendant, however, did not extend credit in reliance upon Bartlett Corporation's *265 apparent financial position and no sufficient ground is presented for the intervention of equity in these circumstances. (Compare Marx v. Parker, supra, p. 475; Morrill v. Raymond, supra, p. 419; Ann. Cas. 1917C, 1145.) In accord with the general rule, therefore, it must be held that Bartlett Corporation had no interest in the money on deposit with the Farmers & Merchants National Bank which could be applied in satisfaction of defendant's judgment. That portion of the judgment which is in favor of plaintiff and against defendant is therefore affirmed.
 [8] In its judgment the trial court sought to place the defendant, Guaranty Liquidating Corporation, in the position it occupied prior to its levy of execution. To that end the court ordered that the sum previously credited on account of defendant's judgment against Bartlett Corporation because of the levy of execution be cancelled so that the judgment might be reinstated at its former amount. It is settled that where a satisfaction of judgment has been erroneously entered, it may be cancelled either upon motion made in the original action or by means of an independent action in equity between the parties. (Merguire v. O'Donnell, 139 Cal. 6 [72 P. 337, 96 Am.St.Rep. 91]; Haggin v. Clark, 61 Cal. 1; Clark v. Johnston, 49 Cal.App. 315 [193 P. 864]; Argue v. Wilson, 3 Cal.App.2d 645 [40 PaCal.2d 297]; 15 Cal.Jur. 273; 2 Freeman, Judgments [5th ed.], p. 2410 et seq.; 51 A.L.R. 243.) Such an order cannot appropriately be made in the present case, however, because Bartlett Corporation is not a party to the action, and it is clear that the judgment debtor must be a party to any action which affects its rights by reinstating the original judgment against it. (See Freeman, supra, p. 2415.) It follows that that portion of the judgment herein purporting to reinstate defendant's judgment against Bartlett Corporation at its original figure must be reversed.
 The judgment is affirmed in part and reversed in part in accord with the foregoing conclusions, costs upon this appeal to be borne by defendant, appellant herein.
 Shenk, J., Curtis, J., Edmonds, J., Carter, J., and Traynor, J., concurred.
