
112 Cal.App.2d 626 (1952)
In re GEORGE W. ROBINSON, on Habeas Corpus.
Crim. No. 2360. 
California Court of Appeals. Third Dist.  
Aug. 8, 1952.
 George W. Robinson, in pro. per., for Petitioner.
 Edmund G. Brown, Attorney General, and Doris H. Maier, Deputy Attorney General, for Respondent.
 SCHOTTKY, J. pro tem.
 George W. Robinson, an inmate of Folsom State Prison, has filed in this court a petition for the issuance of a writ of habeas corpus, alleging that he is illegally restrained of his liberty by the warden of said prison in that the said warden refuses to allow him to forward for filing a petition for a writ of mandate addressed to the District Court of Appeal for the First Appellate District, but instead has referred said petition for writ of mandate to the Adult *628 Authority of the State of California for a determination as to whether the petitioner's civil rights should first be restored.
 Respondent has filed an answer and return, and it appears from the record that petitioner has been convicted of and is serving sentences on five counts of forgery. The conviction was in the Superior Court of Alameda County and the judgments were affirmed in People v. Robinson, 102 Cal.App.2d 800 [228 P.2d 583]. In the petition which he entitled "Petition for Writ of Mandate" petitioner seeks to have the District Court of Appeal of the First District direct the judge of the superior court to forward the original checks used as evidence against him in the criminal case to the United States Identification Bureau for examination as to handwriting. The Adult Authority refused to restore petitioner's civil rights and refused to allow him to forward his so-called petition for writ of mandate to the District Court of Appeal for filing.
 Respondent contends that his action was not an infringement of petitioner's rights because: 1. The petition for habeas corpus does not lie in such a case; and, 2. Section 2600 of the Penal Code suspends the civil rights of felons.
 Respondent argues that the demand of the right of access to a court in a civil action or controversy does not render a prisoner's detention under a valid judgment and commitment illegal and that neither he as warden "nor the authorities of the State of California have deprived petitioner of some right" to which he is "lawfully entitled under the Constitution or laws of this State or of the United States, the deprivation of which serves to make his imprisonment more onerous than the law allows."
 [1] The gist of respondent's argument is that the petition for a writ of mandate which petitioner sought to file was a civil action, and that, because his civil rights had been suspended by reason of section 2600 of the Penal Code, he was not entitled to file same. However the designation by the petitioner of his petition addressed to the First District Court of Appeal as a petition for writ of mandate is not the determining factor in deciding whether he was entitled to file same. Said petition must be judged by its contents rather than its caption and in it petitioner was seeking some action or relief relating to his conviction of the offense for which he was imprisoned. In In re Paiva, 31 Cal.2d 503, our Supreme Court said at page 510 [190 P.2d 604]:
 "It follows that in California, whatever be the character of the proceeding when regarded as an entity in itself, and *629 regardless of its character insofar as concerns the burden of proof and rules of procedure generally, a motion to vacate a judgment in a criminal case upon grounds which make such motion the equivalent of a proceeding in the nature of a writ of error coram nobis, must be regarded as a part of the proceedings in the criminal case; ..."
 In Ex parte Hull, 312 U.S. 546 [61 S.Ct. 640, 85 L.Ed. 1034], it was held that a regulation made by a warden of a state's prison that all legal documents in habeas corpus proceedings by inmates must first be submitted to the Institutional Welfare Office and, if favorably acted upon there, referred to the legal investigator for the parole board who, if deeming the documents submitted to be properly drawn, will direct them to the court designated, or, otherwise, will refer them back to the inmate, is invalid insofar as it abridges the right of an inmate of the prison to apply to a federal court for a writ of habeas corpus. The United States Supreme Court said at page 1036 [85 L.Ed.]:
 "The regulation is invalid. The considerations that prompted its formulation are not without merit, but the state and its officers may not abridge or impair petitioner's right to apply to a federal court for a writ of habeas corpus. Whether a petition for writ of habeas corpus addressed to a federal court is properly drawn and what allegations it must contain are questions for that court alone to determine. [Citing cases.]"
 [2] We believe that the reasoning of the Hull case is applicable to the instant proceeding and that where, as here, a prisoner addresses a petition relating to the judgment of conviction under which he is imprisoned to a court, he is entitled to have that petition filed in said court, and any regulation which is interpreted to prevent such filing is invalid. [3a] The determination of the character of the petition, the relief, if any, to be granted, and the right of the prisoner to file it, are questions for the court alone to decide.
 [4] While the state may, pursuant to section 2600 of the Penal Code, suspend the civil rights of a prisoner imprisoned in a state prison insofar as the right to file ordinary civil actions is concerned, yet the state has no power to deny a person the right to file in any court a petition or other document which purports to seek some remedy or relief relating to the offense for which he was imprisoned. [3b] The question of whether or not the prisoner is entitled to the relief sought, or even whether he is entitled to seek it, are questions *630 which cannot be decided by any prison official or by the Adult Authority, but can and must be decided by the court alone.
 [5] In In re Rider, 50 Cal.App. 797, the court said at page 801 [195 P. 965]:
 "We think that a person may be said to be unlawfully 'restrained of his liberty,' so as to be entitled to the writ of habeas corpus, when, though lawfully in custody, he is deprived of some right to which, even in his confinement, he is lawfully entitled under the constitution or laws of this state or the United States, the deprivation whereof serves to make his imprisonment more onerous than the law allows, or curtails, to a greater extent than the law permits even in his confinement, his freedom to go when and where he likes. In Commonwealth v. Ridgway, 2 Ashm. (Pa.) 247, it was said that whenever a person is deprived of the privilege of going when and where he pleases, he is restrained of his liberty, and has a right to inquire if that restraint be illegal and wrongful, and that, whether it be exercised by a jailer, constable, or private individual."
 [6] We conclude, therefore, that the petitioner had the right to have his so-called petition for writ of mandate forwarded to the District Court of Appeal for filing and that any interference with that right to that extent unlawfully restrained him of his liberty and entitles him to the writ of habeas corpus.
 Let the writ issue requiring the warden of Folsom State Prison to permit petitioner to forward his said petition for a writ of mandate to the District Court of Appeal for the First Appellate District.
 Peek, J., and Van Dyke, J., concurred.
