there are varying ways round this, but essentially whatever you live in you need permission to live there, although you can erect certian buildings and live in those without planning permission as long as they don't realise it. Depends on how legally minded you are, devious and so forth, but it can be done, once or twice quite famously people built houses inside large agricultural buildings, but that sort of thing is getting harder and harder to pull off, but quite a bit of fun and well worth the effort if you've got the disposition:)