Typical File Permissions
Of course, the file permission should be as restrictive as possible and depends on your particular use case scenario. But the typical file permission for files is 644 and for folder is 755 on shared webhosts. Certain sensitive files such as ones containing passwords or configuration files may need to be even more restrictive than this. Permission is 777 is the most loose and is not secure. Some even say never use 777.