Ultimately it comes down to the type of story that you are writing and how you go about writing it. For example, if you are writing a book based on a historical event, you can usually get by with just classifying it as a historical novel or historical fiction based on real events. Most readers will immediately recognize what this means and will not hold you accountable for a great deal of historical accuracy. The same could be said for stories based on individuals who were/are well know historical figures. By indicating that your story is historical fiction based on a specific individual, then the author is often granted a considerable amount of flexibility.
Another factor to take into consideration is the nature of the original story. If it is a pretty well known or well documented event (even if it's just locally), then you can generally get by with just stating that your story is based on actual events. The degree to which you can get away with that will depend on the people that you use in your story.
If your story focuses on a general event without detailing any specific individuals, then it's probably pretty fair game. However, if you are writing in detail about any specific individuals, then you will want to consider how those individuals will be portrayed in your story. If you will be painting them in a positive light, they probably won't mind, but if you are going to be portraying them in a negative light, then they may have some reservations.
Lastly, take into consideration how you will be promoting the finished work. If you are going to be using an individual's name or likeness as part of your promotional materials (i.e. - "Based on the true life events of Joe Somebody."), then you will definitely need to obtain permission for that.