You should not use 777 for all the files.
See the recommended file permissions, which should explain the recommended permissions for the files and directories.
Thank you for your answer. I meant what’s the purpose of setting permissions 777 to some files and folders.
Waiting for your prompt reply.
You should not be setting 777 anywhere – have you been told to do this ?
Yes, I was told to do so. Besides I am just curious. Do you know the purpose of setting them?
Whoever told you is wrong. Very wrong.
755 for folders
644 for all files except those you will edit online which should be 666
OK. I see. Then just answer me the purpose of setting ANY permissions for folders and files, for example, why 755 but not 777. I need to know.
what will happen if I do not set permissions for some files?
You could get errors.
You could leave your site vulnerable.
http://www.tamba2.org.uk/wordpress/chmod/
I see you do not have a full answer. Thank you.
“Besides I am just curious. Do you know the purpose of setting them?”
Here’s an introduction to CHMOD that I made in response to another thread.
Thank you. That was of great help for me.