If you've purchased a flat, you generally have rights to access common areas like the terrace for essential repairs and maintenance, even if you don't own the roof outright. This is often tied to your undivided share of the land. If the terrace owner has locked access, you can first try to resolve it amicably. If that fails, consider issuing a legal notice or seeking a court injunction. Developers illegally selling exclusive terrace rights is a common issue, as rooftops are typically considered common spaces for all residents' benefit.