MEMORANDUM **
Francois Poitier Givens, a California state prisoner, appeals pro se from the district court’s judgment dismissing his action for failure to comply with a court order to file an amended complaint. We have jurisdiction under 28 U.S.C. § 1291. We review for an abuse of discretion, Ferdik v. Bonzelet, 963 F.2d 1258, 1260 (9th Cir.1992), and we affirm.
The district court did not abuse its discretion by dismissing the action after Givens failed to file a third amended complaint within thirty days, despite the court’s order directing him to do so and warning him that noncompliance could result in dismissal. See Pagtalunan v. Galaza, 291 F.3d 639, 642-43 (9th Cir.2002) (concluding that district court did not abuse its discretion by dismissing petitioner’s action for failure to comply timely with order to file an amended petition).
The district court did not abuse its discretion by denying Givens’s motions for a preliminary injunction because the district court did not have personal jurisdiction over the named entities. See Price v. City of Stockton, 390 F.3d 1105, 1117 (9th Cir.2004) (per curiam) (“A federal court may issue an injunction if it has personal jurisdiction over the parties and subject *191matter jurisdiction over the claim; it may not attempt to determine the rights of persons not before the court.”) (citation omitted).
AFFIRMED.