Universities challenged. Traditionally, student accommodation has been far from glamorous: cramped attics, damp basements, poky kitchens and walls pock-marked with the previous inhabitant's Blu Tack. But a report in The Herald today suggests that finding anywhere at all to live is becoming one of the biggest worries for Scotland's burgeoning student population. It is hard to imagine Scotland's five major university cities and towns - Glasgow, Edinburgh, Dundee, Aberdeen and St Andrews - without students. Their presence during term-time is woven deep into the character of these places. But town-gown relations can easily become strained, especially when the high concentration of students is perceived to be changing the social cohesion of certain neighbourhoods and when there is simply not enough accommodation to go around.

Universities challenged. Traditionally, student accommodation has been far from glamorous: cramped attics, damp basements, poky kitchens and walls pock-marked with the previous inhabitant's Blu Tack. But a report in The Herald today suggests that finding anywhere at all to live is becoming one of the biggest worries for Scotland's burgeoning student population. It is hard to imagine Scotland's five major university cities and towns - Glasgow, Edinburgh, Dundee, Aberdeen and St Andrews - without students. Their presence during term-time is woven deep into the character of these places. But town-gown relations can easily become strained, especially when the high concentration of students is perceived to be changing the social cohesion of certain neighbourhoods and when there is simply not enough accommodation to go around.

There is a balance to be had between student accommodation on campus, purpose-built private halls of residence and private rented flats in residential areas. Every summer there are stories about a shortage of student flats. It is easy to dismiss them because, come September, there are no equivalent headlines about homeless students bedding down in parks and doorways.

However, a number of factors are conspiring to create an accommodation crisis that deepens every year. The first is that the number of students has been rising rapidly because of the expansion of further and higher education. In addition, financial pressures on universities and colleges encourage them to recruit more and more non-Scots students, eligible to pay full tuition fees. But, despite the construction of a number of privately owned student accommodation blocks in recent years, the shortfall between supply and demand continues to grow, especially in Edinburgh and Glasgow.

Secondly, since the deaths of two young men in a student flat in Glasgow in 1999, and in response to residents complaining about students "taking over" in their areas, a number of restrictions and regulations have been introduced on homes of multiple occupancy (HMOs). Further restrictions are planned in the west end of Glasgow.

The third factor is the changing property market. Amid booming prices, 750,000 people in Britain have turned themselves into property tycoons in the past few years, including many parents, who prefer to pay a mortgage than rent on their offspring's college accommodation. This produced a glut of accommodation to let that exerted a temporary downward pressure on rents, especially in Glasgow. But with rising interest rates and many properties already apparently overpriced, the average buy-to-let investor is no longer making enough from rent to cover monthly repayment costs. At the same time, in all five of Scotland's major university communities, property prices are such that many are tempted to sell while the going is good. There are already pressures in the market for larger flats, because of the numbers who have exercised the right to buy their council houses and, recently, because of the large influx of migrant workers. Plans to build more affordable housing in Glasgow are being hit by the political paralysis afflicting Glasgow Housing Association. Given the existing shortage of flats, there is a danger that placing further restrictions on HMOs will merely encourage unscrupulous landlords to flout the regulations, putting the lives of students at risk.

Universities and colleges, the property sector and local authorities must act together before it is too late. If they do not, the Scottish Executive should apply the cosh. Students form an important part of Scotland's economy and civic life, but sooner or later the homeless student looks like becoming a reality unless precipitate action is taken.