
226 Cal.App.2d 79 (1964)
JOHN L. OSTROWSKI et al., Plaintiffs and Appellants,
v.
HUGH A. MILLER, as Receiver, etc., Defendant and Respondent.
Civ. No. 21460. 
California Court of Appeals. First Dist., Div. One.  
Mar. 31, 1964.
 William A. Carroll, Frank Solomon, Jr., and Patricia C. Remmes for Plaintiffs and Appellants.
 Di Giorgio & Davis and Thomas R. Davis for Defendant and Respondent.
 BRAY, P. J.
 Plaintiffs appeal from judgment of dismissal in favor of defendant Hugh A. Miller as receiver for defendant P.S.R. & Associates, entered upon order sustaining with prejudice demurrer without leave to amend.
 Questions Presented.
 1. Should the demurrer of defendant receiver have been sustained because of refusal of the Kern County Superior Court to consent to this action against said receiver? Yes.
 2. Should the judgment of dismissal have included the words "with prejudice"? No.
 Record.
 Prior to the filing of this action, and on June 30, 1961, two of the defendants herein filed an action in Kern County against the other defendants herein to dissolve the defendant P.S.R. & Associates (the nature of this association does not appear).  [fn. 1] In that action Hugh A. Miller, who had been employed *82 by P.S.R. as an accountant, was appointed receiver. Thereafter this action was brought by plaintiffs who are investors in P.S.R., against a number of defendants and Miller individually and as receiver. The complaint alleged that the five named defendants formed the association and encouraged investment therein. Thereafter they did acts which prejudiced the rights of the investors, siphoned off the profits and did not account to the investors.  [fn. 2]
 Miller's individual demurrer was overruled. As receiver he demurred, inter alia, on the ground of lack of personal jurisdiction and jurisdiction over the subject matter. Ruling on this demurrer was reserved for 30 days to allow plaintiffs an opportunity to obtain from the Kern County Superior Court an order authorizing this action against the receiver. Plaintiffs' application to that court for such permission was denied. The demurrer in this action was thereafter sustained without leave to amend and with prejudice. Judgment of dismissal of the action as against Miller as receiver was then entered.
 1. Effect of Kern County Court's Denial of Consent To Sue Defendant Receiver.
 Defendant receiver's demurrer, in addition to alleging that the complaint did not state a cause of action as to him, alleged that the court had no jurisdiction of his person nor of the subject of the action as it pertained to him. Further, it alleged the complaint to be ambiguous, unintelligible and uncertain in certain respects. The judgment of dismissal stated that the receiver's demurrer having been sustained without leave to amend, the complaint was dismissed with prejudice as to him. In its memorandum decision the court stated that the receiver's demurrer should be sustained without leave to amend "for lack of jurisdiction of said defendant, as Receiver duly appointed and acting under the direction of the Superior Court in and for the County of Kern, leave to sue having been denied by said Court."
 [1] The bringing of an action against a receiver without the consent of the court appointing the receiver is not a matter of "jurisdiction" in the classical sense. In Murray v. *83 Etchepare (1901) 132 Cal. 286 [64 P. 282], a receiver of certain property was appointed. Thereafter a proceeding to foreclose a mortgage on the property was brought in the same court. The receiver was made a party defendant without permission of the court. He filed a disclaimer in the foreclosure action, except as such interest was given him by his appointment as receiver. The foreclosure judgment provided that it should in nowise affect his interests as receiver. The receiver did not appeal. Upon an appeal taken by the mortgagor only, the court stated (pp. 287-288): "It is true that a receiver is an officer of the court, acting under its direction, and that it is contrary to the established doctrine of courts of equity to permit him to be made a party defendant to litigation, unless by consent of the court appointing him."
 "The rule is established for the protection of receivers against unnecessary litigation, and because, in most cases, ample relief can be obtained by application, on motion to the court making the appointment. (High on Receivers, sec. 254.) In the present case, however, it was provided by the decree that whatever rights the receiver has in the subject of the action should be reserved to him, and no injury, therefore, is shown by appellant."
 In Larson v. Baird (1931) 60 N.D. 775 [236 N.W. 634], the contention was made that leave to sue the receiver had not been obtained before the action was filed. However, before the action was tried, such permission to sue was obtained. The court held that failure to obtain leave to sue "is not jurisdictional, and failure to obtain is an irregularity which may be cured at any stage of the proceedings. ... When the court gives permission to sue, it may grant such permission as of the time of the commencement of the action." (P. 635 [236 N.W.].)
 In Isom v. Rex Crude Oil Co. (1905) 147 Cal. 663, 667 [32 P. 319], the court stated: "It is unquestionably true that a court will not entertain an action to recover property in the possession of a defendant as receiver of another court, unless leave to sue its receiver has been obtained from that court [citation], and the want of power in the federal court to entertain such a suit is held to be jurisdictional. (Peale v. Phipps, 14 How. (U.S.) 368 [14 L.Ed. 459]; Barton v. Barbour, 104 U.S. 126 [26 L.Ed. 672].)" (P. 667.) This statement seems to be contrary to the weight of authority. In the annotation at page 1460 in 29 A.L.R. it is stated: "Though *84 leave to sue a receiver is generally required (see 23 R.C.L. p. 124), the great weight of authority is to the effect that failure to secure permission to sue a receiver appointed by a state court does not affect the jurisdiction of the court in which the suit is brought."
 In the jurisdictions so holding, it is commonly held that the defect is merely technical, and may be remedied by order or may be waived.
 An examination of the authorities cited in A.L.R. shows that where the receiver appeared and sought affirmative relief or otherwise waived his right to object the fact that the complaint did not allege leave to sue does not affect the jursidiction of the court to proceed against the receiver. However, where the receiver raises the failure to obtain such leave it is clear that the court may not then proceed against him.
 [2] A receiver is a court-appointed official who can be sued only by permission of the court appointing him. (2 Witkin, Cal. Proc. Pleading,  65, p. 1042; 42 Cal.Jur.2d, Receivers,  92, pp. 386-388.) The rule is established to protect receivers from unnecessary litigation. [3] The law is accurately set forth in 42 California Jurisprudence 2d, Receivers, section 92, page 387, as follows: "The court that appointed a receiver may grant leave to sue him in an independent action, or it may deny leave and require the claimant to intervene in the receivership proceedings to assert his claim. [4] Although in a proper case leave to sue the receiver in another court will not be denied, and under some situations the denial of leave may amount to an abuse of discretion, ordinarily the court has a wide discretion in the matter. [5] It may not properly refuse leave to sue when it cannot afford in intervention the same relief as the applicant is entitled to in an independent action, or when, by virtue of a statute or constitutional provision, a particular kind of action must be brought in a jurisdiction other than that in which the original special proceeding is pending. [6] But permission may be denied where full relief can be granted by intervention in the original proceeding. The more common practice, and the one generally recommended, is to hear and determine all rights of action and demands against a receiver by petition in the cause in which he was appointed."
 The leading case in California is De Forrest v. Coffey, (1908) 154 Cal. 444 [98 P. 27]. Petition for writ of mandate was filed to compel the judge of a superior court to grant leave to petitioner to sue in an independent action a receiver *85 appointed by that court to handle the affairs of an insolvent banking corporation. The practice of that court was to try issues affecting the assets of the insolvent corporation by way of petition for intervention and subsequent inquiry on whether intervention should be allowed. Petitioner filed no request to intervene. The Supreme Court held that the trial court had discretion whether to require the petitioner to litigate his claim, legal or equitable, in the proceeding in which the receiver was appointed. The court went on to note that there was nothing in the procedure with respect to liquidations of banking corporations which would limit the "ample legal and equitable powers of the superior court, so that one making such a claim as the petitioner does here, against the receiver, as to the assets of the corporation, cannot have his claim as fully and fairly determined by intervention therein as by bringing an independent action." (P. 449.) The court then continues (p. 450): "It [the court] is not required to assume jurisdiction of all controversies to which the receiver may become a party, but may upon application permit them to be determined in some other competent tribunal. ... When the court cannot afford the same relief in intervention as a claimant would be entitled to in an independent action ... the court will undoubtedly grant leave to bring it, and it would be an abuse of discretion not to do so."
 The principle enunciated in this case has been followed consistently. (Auzerais v. Coffey (1909) 155 Cal. 102 [99 P. 1134]; Casey v. Doherty (1931) 116 Cal.App. 42 [2 P.2d 495]; cf: Blanchard v. Superior Court (1935) 5 Cal.App.2d 115 [42 P.2d 689]; Garris v. Mitchell (1935) 7 Cal.App.2d 430, 434 [46 P.2d 225]; Mills v. Superior Court (1937) 20 Cal.App.2d 360, 363-364 [66 P.2d 1207]; Chiesur v. Superior Court (1946) 76 Cal.App.2d 198, 202 [172 P.2d 763].)
 This brings us to the question of whether the inability of the trial court to proceed against the receiver was properly raised by demurrer and whether the demurrer should have been sustained. [7] The fact that the court sustained the demurrer on the wrong ground, namely, lack of jurisdiction, would not require a reversal here if there is any ground upon which the court's action in sustaining the demurrer can be supported. [8] "[N]o citation of authority is required for the statement that if the demurrer should have been sustained upon any of the grounds urged, the judgment will not be reversed. [9] It is the validity of the court's action in sustaining the demurrer which is here reviewable, and not *86 the court's opinion or statement of reasons for its action." (Southall v. Security Title Ins. etc. Co. (1952) 112 Cal.App.2d 321, 323 [246 P.2d 74]; accord: Moxley v. Title Ins. & Trust Co. (1945) 27 Cal.2d 457, 462 [165 P.2d 15, 163 A.L.R. 838].)
 [10a] The effect of raising the question of the right of plaintiff to maintain the action against the receiver in face of the refusal of the appointing court to consent, is that defendant receiver was actually entering a plea in abatement. While at common law a plea in abatement was a separate pleading filed prior to demurrer or answer, the code system abolished the separate pleading but allowed the same kinds of objections as in abatement to be raised by demurrer or answer. (See 2 Witkin, Cal. Procedure,  553, p. 1551.) [11] The objection must be made at the first opportunity--by demurrer if it appears on the face of the complaint. (Idem, p. 1553; Kelley v. Upshaw (1952) 39 Cal.2d 179, 186 [246 P.2d 43].) [12] In the case at bench, the defect appears on the face of the complaint--it is not alleged that consent to sue had been obtained.
 [10b] The trial court, in effect, treated (and properly so) defendant receiver's demurrer as a plea in abatement. It continued the hearing thereon to permit plaintiff to obtain the consent of the appointing court. This consent that court refused to give. Hence the court below properly sustained the demurrer, even though improperly giving the reason therefor, and also properly dismissed the action.
 [13] Plaintiffs contend that the ruling of the Kern County Superior Court on their application for leave to sue the receiver is ambiguous, in that the order refers to "plaintiffs" instead of "petitioners" as the prosecutors of the application for leave to sue the receiver. This contention is without merit. Section 1063, Code of Civil Procedure, provides: "The party prosecuting a special proceeding may be known as the plaintiff, and the adverse party as the defendant."
 [14] Plaintiffs attempt to attack the order of the Kern County Superior Court denying leave to sue on matters which they contend show that that court abused its discretion in making the order. These matters are not cognizable in this proceeding. Neither the court below nor this court can review the action of the Kern County court. Whether that court abused its discretion is a matter that can only be determined in the receivership proceeding. *87
 2. Dismissal With Prejudice.
 The court sustained the demurrer with prejudice and entered a judgment dismissing the action with prejudice.
 [15a] While the sustaining of the demurrer and the entering of the judgment were proper, it was improper to make the order and judgment with prejudice.
 [16] As said in Kelley v. Upshaw, supra, 39 Cal.2d 179, 186 [246 P.2d 23], quoting from Nevills v. Shortridge (1905) 146 Cal. 277, 278 [79 P. 972]: "A plea in abatement, without disputing the justness of plaintiff's claim, objects to the place, mode, or time of asserting it and requires pro hac vice that the judgment be given for the defendant, leaving it open to renew the suit in another place, or form, or at another time. It must not only point out the plaintiff's error, but must show him how it may be corrected, or, in technical language, it must give the plaintiff a better writ." See also Burnand v. Irigoyen (1943) 56 Cal.App.2d 624, 629, 630 [133 P.2d 3]; Fireman's Fund Indem. Co. v. Knorr (1953) 117 Cal.App.2d 761, 764-765 [256 P.2d 1005]. [15b] While, in the case at bar, plaintiff's inability to obtain the consent of the Kern County court to this action against the receiver required the entry of judgment in favor of defendant receiver, such judgment could and should not bar the assertion of any claim plaintiffs may have against the receiver in another action, should the Kern County court hereafter and before such claim outlaws, consent to such an action. It is possible that that court might on a later determination consent to such a suit. The court in this case had no right to bar that possibility.
 The words "with prejudice" in the judgment entered herein are stricken therefrom. In all other respects the judgment is affirmed. Respondent is to recover costs on appeal.
 Sullivan, J., and Molinari, J., concurred.
NOTES
[fn. 1]  1. In the complaint herein it is stated that P.S.R. & Associates has claimed to be variously a joint venture, a partnership and an association.
[fn. 2]  2. The complaint alleges fraud, negligent misrepresentation, breach of contract, conspiracy, receipt of secret profits. It seeks declaratory relief against all defendants on issues of corporate management, a determination that assets of P.S.R. & Associates are held in constructive trust, and recovery of the secret profits. Apparently the only relief sought against defendant Miller as receiver is an accounting.
