On all house drainage system, there is a s-trap that provides as a gas barrier when it is filled with water. When the system in question is not used for a long period of time, the water in the s-trap gets evaporated and the barrier is breached. What you are smelling is sewer gas. Just pour water or flush the toilet to replenish the water in the s-trap.