Nearly 1.7 billion people are infected with Mycobacterium tuberculosis. Its ability to survive intracellularly is thought to be central to its success as a pathogen, but how it does this is poorly understood. Using a Drosophila model of infection, we identify three host cell activities, Rab7, CG8743, and the ESCRT machinery, that modulate the mycobacterial phagosome. In the absence of these factors the cell no longer restricts growth of the non-pathogen Mycobacterium smegmatis. Hence, we identify factors that represent unique vulnerabilities of the host cell, because manipulation of any one of them alone is sufficient to allow a nonpathogenic mycobacterial species to proliferate. Furthermore, we demonstrate that, in mammalian cells, the ESCRT machinery plays a conserved role in restricting bacterial growth.