0
votes

I know there are bunch of posts all over the internet about the WordPress permissions, but I am facing an issue I can't explain from the other posts. I am running debops WordPress on Ubuntu 16.04 with nginx.

Basically my updates within WordPress are failing, I am getting the "Could not create directory error". So I checked the permissions, and they are all correct (755 for the directories, 644 for the files). Furthermore I checked that nginx is actually running as www-data user, which it does:

ps aux|grep nginx|grep -v grep

Shows that nginx is running as www-data.

To verify the permissions, I tried:

sudo -u www-data mkdir test

which worked and created the test directory. Then some other posts made me think it has to do with a FTP configuration, most of them point to the vsftpd.conf file, but I don't have vsftpd installed (though I am able to connect via sftp to the ubuntu machine).

Question: What other reasons might cause this issue? Technically, WordPress has all the permissions to create it's directories.

1

1 Answers

1
votes

Ok I found the problem:

nginx was indeed running as www-data user, but that wasn't the issue. From the debops issues I found that the correct user who should own the WordPress directory is the 'wordpress' user, not www-data.

chown wordpress:wordpress /var/www/ -R

Now everything works well with the updates.