1.- 777 gives Read Write Execution privileges to Anybody, its not a good practice..
2.- Only webserver user needs privileges. -The user who start webserver process-
3.- You need to know which is webserver user.
4.- Once you know it, you need to do the following:
a.- Log into webserver account.
b.- chmod 644 -R [site-content-root-folder] (read/write privileges to current user, read only to any other)
In case your Linux Flavor descends of RedHat you must to Know about SELinux.
and the folder content root must tell us this:
$ls -Z [site-content-root-folder]/
$unconfined_u:object_r:httpd_sys_rw_content_t:s0 index.php unconfined_u:object_r:httpd_sys_rw_content_t:s0 wp-cron.php
if not launch the command:
$sudo chcon -R -t httpd_sys_rw_content_t [site-content-root-folder]/
-
This reply was modified 9 years, 6 months ago by robertoteles.