You are allowed in, with 5 months remaining, like you have.
We go away next year and both my daughters passports have 5.5 months left at the end of the holiday, I have checked with the Passport office and with the Greek Embassy, and it is fine for both.
Some airlines RECOMMEND only that you have 6 months, NO ONe can refuse you entry so long as its still valid.