The basic problem is a failed call to mkdir() with a "permission denied" error message.
The call looks like this:
Code: Select all
mkdir('/var/www/vhosts/olliesaunders.net/code/../data/comments/articles', 0755, true);open_basedir is off.
safe_mode is off.
PHP runs as the user osnet and the containing directory of the ones to be created is owned by that user web osnet and has the read, write and execute flags set.
mkdir() isn't the only thing affected. If I manually create the directories the next thing involving the filesystem (file_put_contents) fails too. However, I am able to create the directories using PHP, even when running as the web user (osnet):
Code: Select all
sudo -u osnet php -r 'mkdir("/var/www/vhosts/olliesaunders.net/code/../data/comments/articles", 0755, true);'