Ran into this question a couple weeks back with a buyer who wanted to make an offer on a HUD home before it was available to investors. According to HUD the answer is one year, but I will echo the sentiments of the other answers here that it depends on who is asking for the owner occupancy.
Coldwell Banker Burnet
If you have a property in mind, we can find out the details. Otherwise, answers vary.
"I will occupy, establish and use the property as my primary residence within 60 days after the closing and continue to occupy the property as my primary residence for at least one year...In the even that I do not occupy the property...I shall pay $10,000 to the seller as liquidated damages...in addition to the seller's right to retain any earnest money deposit...I agree to pay seller's attorney fees and cost...."
I've seen requirements to live in the property for 3/5 years and for 5 years.
If you have any questions about any particular home, you can contact me at email@example.com or 612-728-2204.