In the current era, grid computing and cloud computing are the main fields in this paper. This paper define which are the main security issues to be considered in cloud computing and grid computing, and how some of these security issues are solved. Comparative study shows the grid security is tighter than the cloud. It also shows cloud computing is less secure and faced security problems. This paper based on main security problems in cloud computing such as authentication, authorization, access control and Service Level Agreement (SLA).