The company existed from 1985 to 2000. Then it was taken over by another company and later that was also taken over by another. I'm writing the story of that company. Do I need to take any permissions?
You do not need, and often should not seek, the permission of a company, defunct or active, to write a non-fictional account of it. If one did need such permission, no negative news stories would ever be published.
If you want to gain access to internal company documents or histories, you will need cooperation from the company or someone inside it.
If the account you are writing is not itself being used to advertise or sell anything, there is no issue with trademarks.
However, if the company or its current successors claim that you made false and damaging statements about the company, they might well sue for some version of defamation. This can be time consuming and expensive even if you win. The laws on defamation vary considerably from one country to another. Within the US they vary somewhat from state to state. Consulting a lawyer on such maters is often a good idea. If the work is to be published by a major magazine or book publisher, that publisher may have a staff lawyer who will check a manuscript and give an opinion on the degree of risk involved.
It is well to make sure that any negative information is substantiated by multiple credible sources, and that these are well documented. It can be a good idea to ask the company for a response to any negative information in the account.
A defamation suit can occur even when the writer had received permission to write the article or book. Also, individuals mentioned may be able so sue individually for defamation.
A defamation claim will involve allegations of false statements of purported facts. Making every effort to keep factual statements accurate is helpful.
Statements especial;y negative statements, depending on a specific source should be attributed to that source. Write "Jones says that Acme often violated environmental laws. not "
Acme often violated environmental laws." Even then it is well to have multiple sources.
Any documents written by others, whether they are published or not, are likely to be protected by copyright, and should not be reproduced in full without permission. However brief quotations are often permitted by copyright law. The exact scope of permitted quotations will depend on what country's laws are involved, and on the exact details of the situation. Quotes should always be clearly identified as such, and the source and author acknowledged.
I should also mention that if you gain access to internal company documents without permission, and publish information from tht, that may be actionable under trade secret laws, depending on the information invo9lved, and the relevant country. such laws vary.
It is also worth examining this answer on Law.SE about a biography, as some of the same issues arise.