
    James MURRAY, Appellant v. FEDERAL BUREAU OF PRISONS; Harrell Watts.
    No. 12-2490.
    United States Court of Appeals, Third Circuit.
    Submitted for Possible Summary Action Pursuant to Third Circuit LAR 27.4 and I.O.P. 10.6 July 12, 2012.
    Opinion Filed: July 24, 2012.
    James Murray, Lewisburg, PA, pro se.
    Before: FUENTES, GREENAWAY, JR. and BARRY, Circuit Judges.
   OPINION

PER CURIAM.

James Murray filed a 28 U.S.C. § 2241 habeas corpus petition in the United States District Court for the Middle District of Pennsylvania. He claimed that he was being denied access to legal materials and was not allowed to act in court on his own behalf.

The District Court dismissed the petition, and we will summarily affirm its judgment. Murray v. Bledsoe, 650 F.3d 246, 248 (3d Cir.2011) (per curiam); see also 3d Cir. L.A.R. 27.4; I.O.P. 10.6. While habeas corpus petitions under 28 U.S.C. § 2241 can be used to challenge the “execution” of a federal sentence, Cardona v. Bledsoe, 681 F.3d 533, 535 (3d Cir.2012), they cannot be used to attack confinement conditions. Rather, such claims should be raised in a civil-rights suit. See Leamer v. Fauver, 288 F.3d 532, 544 (3d Cir.2002); see also Porter v. Nussle, 534 U.S. 516, 520, 532, 122 S.Ct. 983, 152 L.Ed.2d 12 (2002) (discussing broad definition of “prison conditions”); Brown v. Mills, 639 F.3d 733, 734 (6th Cir.2011) (approving the conversion of a § 2241 petition that attacked, inter alia, “restricting ... access to legal materials [and] to the law library” as a civil-rights complaint). The District Court therefore correctly dismissed the petition without prejudice to Murray’s commencing another action in the proper context.

For the foregoing reasons, the order of the District Court will be affirmed. Murray’s motion to expedite is denied as moot. 
      
      . We have jurisdiction under 28 U.S.C. § 1291 and conduct de novo review. Ballentine v. United States, 486 F.3d 806, 808 (3d Cir.2007); Fowler v. U.S. Parole Comm’n, 94 F.3d 835, 837 (3d Cir.1996).
     