Cloud computing, which acts as a service tool to internet users, has numerous data sources. The data from users should be stored and shared securely. Data security regarding Open System Interconnection (OSI) network layers was not concentrated by any of the existing works. Hence, a secured data sharing in the OSI model is proposed in this paper. Primarily, the data owner registers in the Application Layer and logs in to access the cloud. Then, with the help of preprocessing, optimal feature selection using the Bernoulli Distribution Lyrebird Optimization Algorithm (BD-LOA), and classification using Beltrami-coefficient Rectified Linear Unit-Long Short Term Memory (BR-LSTM), the Uniform Resource Locator (URL) link is verified in the Presentation Layer. Now, the data is uploaded to the cloud via the legitimate site. Here, using Security Token XOR Session Key Quantum Cryptography (STXORSK-QC), the data is secured in the Authorization Layer. Then, in the Network Layer, the IP address of the user is spoofed by the Knuth shuffle technique. Now, the data is uploaded to the Physical Layer using 2’s Complement Grøstl Hashing Algorithm (2CGHA) after balancing the loads of multiple requests using BD-LOA in the Transport Layer. In the meantime, by using the Diffie Hellman Digit Folding Caesar Cipher Text-Message Authentication Code (DHDFCCT-MAC) algorithm, the user verification is done. The data to be downloaded in the Data Link Layer is checked by the verified user. The user downloads the data if it is not attacked. Therefore, the proposed system uploaded the data with a 98.03% security level and classified the data attack with 99.15% accuracy, thus showing superior performance than the existing works.