Dear @Sunil Gill,
thank you for sharing your question with the community.
As for your question, I tried to find out the exact procedure, however most informations are in greek and I am not greek speaker.
But what I could find out is that, if you apply for renewal you should apply at least 2 months before your current permit expires. And for the permenant residence permit you have to have at least 5 years the greek residence permit.
****://***.kep.gov.gr/portal/page/portal/kep
On this site there are ment to be more information from the government on other conditions in order to get the permenant residence permit.
I hope I could help you, if you need further guidance please do not hesitate to use the platform.
Best regards,
Nilab