With my respect to Saqib , file premission 777 can be very danger. Use 755 or 644 on files and folder that you need to read only. Different folders and files have different file premissions. The rule is: less as possible. With another words, folders where you don't upload files to, need read only premission.