At one time when the Buddha was staying at Sāvatthī in Anāthapiṇḍika’s Monastery, a number of monks dressed only in sarongs were making robes in a certain village monastery. Nuns entered that monastery without asking permission and approached those monks. The monks complained and criticized them, “How can nuns enter a monastery without asking permission?” … “Is it true, monks, that nuns did that?” “It’s true, sir.” The Buddha rebuked them … “How can nuns do that? This will affect people’s confidence …” … “And, monks, the nuns should recite this training rule like this:
First preliminary ruling ‘If a nun enters a monastery without asking permission, she commits an offense entailing confession.’”
In this way the Buddha laid down this training rule for the nuns.
Second substory Soon afterwards those monks left that monastery. But even though the nuns had heard that the monks had left, they did not go there. Soon the monks returned. When the nuns heard that this was the case, they asked permission and then entered that monastery. They approached the monks and bowed down to them. The monks then said to them, “Sisters, why didn’t you sweep the monastery, or put out water for drinking or water for washing?” “The Buddha has laid down a training rule that we may not enter a monastery without asking permission. That’s why we didn’t do it.” They told the Buddha. Soon afterwards the Buddha had the Sangha gathered and addressed the monks: “Monks, when a monk is available, a nun should enter a monastery only after asking permission. And so, monks, the nuns should recite this training rule like this:
Second preliminary ruling ‘If a nun, when a monk is available, enters a monastery without asking permission, she commits an offense entailing confession.’”