ORDER
This pro se federal prisoner appeals a district court judgment dismissing his petition for a writ of error coram nobis filed pursuant to 28 U.S.C. § 1651. This case has been referred to a panel of the court pursuant to Rule 34(j)(1). Rules of the Sixth Circuit. Upon examination, this panel unanimously agrees that oral argument is not needed. Fed. R.App. P. 34(a).
Following a jury trial, Guillermo Rocha was convicted of conspiracy to distribute cocaine, possession with intent to distribute, and interstate travel in aid of racketeering. He was sentenced to concurrent terms of 365 months, ten years, and five years, respectively. The Sixth Circuit affirmed the convictions United States v. Castro, 908 F.2d 85, 87 (6th Cir.1990), appeal after remand. United States v. Castro, No. 89-1531, 1990 WL 127432 (6th Cir. Sept.5, 1990) (order) (unpublished).
In a previous motion to vacate sentence, Rocha claimed that the district court erred by sentencing him under the sentencing guidelines because the convictions were based on conduct that occurred for the most part before the effective date of the guidelines. He also maintained that he *477was denied the effective assistance of counsel. The district court dismissed the petition and a panel of this court affirmed the district court’s judgment. Rocha v. United States, No. 92-2024, 1993 WL 57479 (6th Cir. Mar.4, 1993).
In his petition for a writ of error coram nobis, Rocha contended that his 365 month sentence is illegal because the Sentencing Commission lacked the statutory authority to create and promulgate drug conspiracy penalties under the mandatory-minimum sentencing scheme for any drug conspiracy which began and was completed prior to the effective date of the Anti-Drug Abuse Act of 1988. The magistrate judge recommended that Rocha’s petition for a writ of error coram nobis be dismissed. The district court adopted the magistrate judge’s report and recommendation over Rocha’s objections because Rocha did not present any grounds cognizable under 28 U.S.C. § 1651.
In his timely appeal, Rocha reasserts the contention set forth in the district court.
A district court’s determination of legal issues in coram nobis proceedings is reviewed de novo. See Blanton v. United States, 94 F.3d 227, 230 (6th Cir.1996). The district court’s findings of fact, however, must be upheld unless clearly erroneous. Id.
Upon review, we conclude that the district court properly denied Rocha’s petition for a writ of error coram nobis. Coram nobis is an extraordinary writ, used only to review errors of the most funda- ' mental character-e.g., errors rendering the proceedings themselves invalid. Id. To be entitled to relief, the petitioner must demonstrate: (1) an error of fact; (2) unknown at the time of trial; (3) of a fundamentally unjust character which probably would have altered the outcome of the challenged proceeding if it had been known. Id. In addition, the writ of error coram nobis is available only when a § 2255 motion is unavailable — generally, when the petitioner has served his sentence completely and thus is no longer “in custody” as required for § 2255 relief. United States v. Johnson, 237 F.3d 751, 755 (6th Cir.2001).
Rocha’s petition does not meet these standards. In the case at bar, although § 2255 relief may be no longer available to him, Rocha remains a prisoner in federal custody serving the federal sentence under attack. A prisoner in custody is barred from seeking a writ of error coram nobis. Id.; United States v. Brown, 117 F.3d 471, 475 (11th Cir.1997) (holding that coram nobis relief is not available to a prisoner in custody); United States v. Bush, 888 F.2d 1145, 1147 (7th Cir.1989) (same); United States v. Little, 608 F.2d 296, 299 n. 5 (8th Cir.1979) (coram nobis lies only where the petitioner has completed his sentence and is no longer in federal custody, is serving a sentence for a subsequent state conviction, or has not begun serving the federal sentence under attack); United States v. Brown, 413 F.2d 878, 879 (9th Cir.1969) (holding coram nobis relief unavailable to a prisoner in custody). Rocha’s petition therefore fails.
Moreover, Rocha has not alleged any error of fact which creates a fundamental injustice. Rather, he merely raises a legal challenge concerning whether or not he was improperly sentenced. In addition, Rocha was aware of the facts underlying his argument at sentencing, and therefore, the argument is insufficient to entitle him to coram nobis relief. See Blanton, 94 F.3d at 230. Arguments that could have been raised on direct appeal are not properly brought in a coram nobis petition, which must be based on matters not appearing in the record. United States v. Keane, 852 F.2d 199, 202-03 (7th Cir.1988).
*478Accordingly, we hereby affirm the district court’s judgment pursuant to Rule 34(j)(2)(C), Rules of the Sixth Circuit.