The quick development of innovations and increasing use of the internet of things (IoT) in human life brings numerous challenges. It is because of the absence of adequate capacity resources and tremendous volumes of IoT information. This can be resolved by a cloud-based architecture. Consequently, a progression of challenging security and privacy concerns has emerged in the cloud based IoT context. In this paper, a novel approach to providing security in cloud based IoT environments is proposed. This approach mainly depends on the working of rough set rules for guaranteeing security during data sharing (rough set method-cloud IoT (RSM-CIoTD)). The proposed RSM-CIoTD conspire guarantees secure communication between the user and cloud service provider (CSP) in a cloud based IoT. To manage unauthorized users, an RSM-CIoTD scheme utilizes a registered authority which plays out a two-degree confirmation between the network substances. The security and privacy appraisal techniques utilize minimum and maximum trust benefits of past communication. The experiments show that our proposed system can productively and safely store the cloud service while outperforming other security methods.