PHP file permissions

2019-09-04 08:44发布

问题:

How can I set permissions of a file to let a PHP program read and write but not be read by the public. When I set read permissions it denies PHP to the files.

回答1:

  • change ownership to the apache user (either apache, www-date or http, depending on OS).
  • modify permission, chmod 700 or chmod 750