According to IND and UK Home Office, effective 3rd of April 2006, it will be five years of legally living in the UK before one can apply for permanent residency.
http://www.ind.homeoffice.gov.uk/ind/en/ho.../section_1.html
"Statement of Changes in Immigration Rules HC 974
Press releases and announcements > Statement of Changes in Immigration Rules HC 974
22 March 2006
A new Statement of Changes in Immigration Rules, House of Commons Paper 974, was laid before Parliament on 13 March 2006 under section 3 (2) of the Immigration Act 1971. The changes shall take effect on 3 April 2006. An Explanatory Memorandum accompanies this document. "
Indefinite leave to remain for a work permit holder
134. Indefinite leave to remain may be granted, on application, to a person admitted as a work permit holder provided:
(i) he has spent a continuous period of 5 years in the United Kingdom in this capacity; and
he has met the requirements of paragraph 128(i) to (v) throughout the 5 year period; and
(iii) he is still required for the employment in question, as certified by his employer. "
But applying for a naturalization is also 5 years. Home Office might change that as well, probably next year, or it will remain 5 years but need to have residency first before applying. Anyway it will take 6 months or over for the naturalization to be approved.