Many plant pathogenic fungi penetrate host surfaces mechanically, using turgor pressure generated by appressoria, specialized infection cells. These appressoria develop semipermeable cell walls and accumulate osmolytes internally to create turgor by osmosis. While melanin is known to be important for turgor generation, the mechanism for wall semipermeability has remained unclear. Here we identifyPKS2andPBG13, by reverse genetics, as crucial for forming the semipermeable barrier in anthracnose and rice blast fungi. These genes encode enzymes that synthesize 3,5-dihydroxyhexanoic acid polymers essential for the cell wall properties. Deleting these enzymes impairs cell wall porosity, abolishing turgor and pathogenicity without affecting melanization. Our findings uncover a novel mechanism of turgor generation, linking enzyme function to pathogen penetration and disease potential, presenting new targets for disease control.