Ebonite rods are negatively charged, while glass rods are positively charged when rubbed. Opposite charges attract each other, leading to an attractive force between the rods.