Hi there,
I'm running into directory permission issues on a Plesk 11.0.9 server that I have never run into before with any other Wordpress website on any other server, and they simply don't make sense.
Wordpress was installed on the server by a web developer manually, not via Plesk. I have no reason to be concerned about the installation of Wordpress, and in fact I myself prefer to install Wordpress manually rather than using Plesk. However, there have been issues from the start with things like uploading media files.
This particular site went live in December, and this month (with the change of year and month) Wordpress created two new directories:
Now, I changed the ownership of the older directories to "user : psaserv" in line with previous practice on previous servers under earlier versions of Plesk that I have been using for years. This has always worked. But even so, you can see that Wordpress successfully created the "2015" and "01" directories, and the permissions indicate that the "apache" user should be able to write to both directories. And yet Wordpress reports, "Upload folder is not writable. Export and file upload features will not be functional."
I don't get it. It's right there in black and white that the "2015/01" directory is writeable by the "apache" user that created the directories in the first place.
In my research I have come across the threads at http://talk.plesk.com/threads/web-directory-ownership-permissions-problem.95939 and http://talk.plesk.com/threads/wordpress-owner-group-permission-issues.108025 , but neither address my problem in that the permissions are correct (as far as I can see) but Wordpress complains. There is also a thread in the Wordpress.org support forums at https://wordpress.org/support/topic/wp-asking-for-my-ftp-credentials-to-install-plugins that basically ends with, "Then you should probably talk to your web-host ..." but that's us in this case (not the case in the Wordpress support forum). Perhaps I should post to the Wordpress.org support forum, but something tells me this is a Plesk configuration issue, not a Wordpress issue, and so here I am.
Based on the information at http://download1.parallels.com/Ples...inistrator-guide/index.htm?fileName=70669.htm I initially decided to run PHP as a FastCGI application on this server. However, this created endless problems with Wordpress websites that culminated with PHP crashing, and all PHP sites not working. After considerable research and advice, I reverted to running PHP as an Apache module, and that solved those problems. This site is running PHP as an Apache module. The second Plesk forum link in the last paragraph ( http://talk.plesk.com/threads/wordpress-owner-group-permission-issues.108025 ) includes a dead link to a Media Temple article, and I found another article at https://kb.mediatemple.net/questions/1999/Resolve+FastCGI+Issues entitled "Resolve FastCGI Issues". Some of the issues that are addressed by the suggestions in this article may address the issues we had previously when running PHP as a FastCGI application, but I'm very leery of going back to running PHP as a FastCGI application after my experience.
To summarise:
Craig
I'm running into directory permission issues on a Plesk 11.0.9 server that I have never run into before with any other Wordpress website on any other server, and they simply don't make sense.
Wordpress was installed on the server by a web developer manually, not via Plesk. I have no reason to be concerned about the installation of Wordpress, and in fact I myself prefer to install Wordpress manually rather than using Plesk. However, there have been issues from the start with things like uploading media files.
This particular site went live in December, and this month (with the change of year and month) Wordpress created two new directories:
- /var/www/vhosts/example.com/httpdocs/wp-content/uploads/2015
- /var/www/vhosts/example.com/httpdocs/wp-content/uploads/2015/01
Code:
[11:32:24 root@server uploads]# pwd
/var/www/vhosts/example.com/httpdocs/wp-content/uploads
[11:32:29 root@server uploads]# ls -la
total 36
drwxrwxr-x 9 user psaserv 4096 Jan 1 08:04 .
drwxrwxr-x 6 user psaserv 4096 Dec 13 00:48 ..
drwxrwxr-x 3 user psaserv 4096 Dec 11 22:48 1998
drwxrwxr-x 3 user psaserv 4096 Dec 11 22:48 2006
drwxrwxr-x 4 user psaserv 4096 Dec 11 22:48 2010
drwxrwxr-x 4 user psaserv 4096 Dec 11 22:48 2012
drwxrwxr-x 9 user psaserv 4096 Dec 11 23:01 2014
drwxrwxr-x 3 apache apache 4096 Jan 1 08:04 2015
drwxrwxr-x 6 user psaserv 4096 Dec 18 23:34 gravity_forms
[11:32:33 root@server uploads]# ls -la 2015
total 12
drwxrwxr-x 3 apache apache 4096 Jan 1 08:04 .
drwxrwxr-x 9 user psaserv 4096 Jan 1 08:04 ..
drwxr-xr-x 2 apache apache 4096 Jan 1 08:04 01
[11:32:40 root@server uploads]#
Now, I changed the ownership of the older directories to "user : psaserv" in line with previous practice on previous servers under earlier versions of Plesk that I have been using for years. This has always worked. But even so, you can see that Wordpress successfully created the "2015" and "01" directories, and the permissions indicate that the "apache" user should be able to write to both directories. And yet Wordpress reports, "Upload folder is not writable. Export and file upload features will not be functional."
I don't get it. It's right there in black and white that the "2015/01" directory is writeable by the "apache" user that created the directories in the first place.
In my research I have come across the threads at http://talk.plesk.com/threads/web-directory-ownership-permissions-problem.95939 and http://talk.plesk.com/threads/wordpress-owner-group-permission-issues.108025 , but neither address my problem in that the permissions are correct (as far as I can see) but Wordpress complains. There is also a thread in the Wordpress.org support forums at https://wordpress.org/support/topic/wp-asking-for-my-ftp-credentials-to-install-plugins that basically ends with, "Then you should probably talk to your web-host ..." but that's us in this case (not the case in the Wordpress support forum). Perhaps I should post to the Wordpress.org support forum, but something tells me this is a Plesk configuration issue, not a Wordpress issue, and so here I am.
Based on the information at http://download1.parallels.com/Ples...inistrator-guide/index.htm?fileName=70669.htm I initially decided to run PHP as a FastCGI application on this server. However, this created endless problems with Wordpress websites that culminated with PHP crashing, and all PHP sites not working. After considerable research and advice, I reverted to running PHP as an Apache module, and that solved those problems. This site is running PHP as an Apache module. The second Plesk forum link in the last paragraph ( http://talk.plesk.com/threads/wordpress-owner-group-permission-issues.108025 ) includes a dead link to a Media Temple article, and I found another article at https://kb.mediatemple.net/questions/1999/Resolve+FastCGI+Issues entitled "Resolve FastCGI Issues". Some of the issues that are addressed by the suggestions in this article may address the issues we had previously when running PHP as a FastCGI application, but I'm very leery of going back to running PHP as a FastCGI application after my experience.
To summarise:
- Am I blindly missing something in the ownership and permissions of the relevant directories above that would prevent Wordpress from uploading/moving files to the /var/www/vhosts/example.com/httpdocs/wp-content/uploads/2015/01 directory?
- Would running PHP as a FastCGI application on this particular website address the complaint from Wordpress that the "Upload folder is not writable"?
- Does anybody have any idea what the root cause is of what's going on here that I don't see on other servers?
Craig