In recent years, online social networks (OSNs) have become an essential part of our social life. In OSNs, users can post resources to predefined groups of users, for example, family, friends, close friends. However, due to these predefined groups of users, few irrelevant users may get access to these published resources. Moreover, the users cannot configure privacy settings due to the lack of technical knowledge and the rigidity of the access control management system. To tackle these issues, we propose a text-based dynamic and fine-grain access control system for OSNs. Our proposed model uses a dynamic clustering algorithm to create user clusters based on the mutual interests of the users. After clustering, the proposed system creates automatic access rules based on the relationship between the users’ clusters and their resources. The proposed system will ensure fine-grained access control and automatic assignment of policies to the text-based resources. We have implemented our system to gauge the applicability, and the results are discussed in the experiments section.