WordPress working only with permissions as 777


Staff member
I have installed WordPress on my VPS server. (Centos, Linux, apache). But after installing, WordPress is not able to create files.

If I set the permissions for WordPress directory and its subfolders as 777 everything is working fine. But I know setting 777 is very dangerous.

What permissions should I set? or how can I fix this?

I used this command to set permissions

chmod 777 wordpress_folder -R