How can I stop all files being read only to PHP? [migrated]

I’m setting up a new Centos 7 server to run some legacy sites on PHP 5.6.40 through PHP-FPM with Nginx.

However, I’m running into a problem that all files are appearing to be read only.

PHP is running under the nginx user, the site directory is owned by nginx, and I’ve tried verious file permissions through chown, including "777".

I created a simple program to illustrate:

<?php $  fileList = glob('*');  //Loop through the array that glob returned. foreach($  fileList as $  filename){    //Simply print them out onto the screen.    echo $  filename;    if (is_writable($  filename))       echo ' - Yes!';    else       echo ' - No.';    echo '<br>'; } 

This will output the files in the site directory, with "No" next to each filename.

Any tips on what might be causing this, or how I might be able to debug would be greatly appreciated.