what is diference between 755/777
777 is commonly called "world writable" which means that anyone with server access can alter the file or folder. You should avoid using 777 unless it's required by the script.
in general, folders are set with
CHMOD 0755 (
./cache,
./cache/themes,
./uploads,
./uploads/avatars folders should be
0777)