• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Wordpress Owner/Group/Permission Issues

S

sparkweb

Guest
I have a client running a Wordpress installation, and I'm, having trouble with it writing to files or uploading and writing images to the uploads folder from within the Wordpress installation due to ownership issues.

My Plesk installation by default creates a folder's owner/group as the usersFtp/pcacln, where the usersFtp is whatever the user's FTP account is.

In order to upload image files using the built-in Wordpress uploader, I had to set other/public permissions to r-w-x. Allowing both the owner and the group to write did not work, indicating that the Web server was not included in either owner or group. After uploading the images, they indeed were now assigned owner/group of apache/apache. So the WP installation is as expected using Apache as the owner.

But this is an untenable and unsafe way to run a Web site. I can't have files that need to be writable with public write permissions, and I can't be switching permissions back and forth every time someone wants to upload an image, and as far as I understand, it's not safe to have Apache own the files.

Does anyone have a reasonable solution to this problem?

What happens if I change the pcacln group to Apache? Doesn't Plesk need this group for something?

What if I assign both pcacln and apache to a single group and assign the files that group? (And does anyone know how to create groups? -- yes I can SSH and use command line to some extent --I am using Putty).

Is it possible to use php's suexec, and how do I activate it?

------UPDATE------

I have discovered that the answer may be to simply run php as fastcgi so that php runs as the domain/FTP user. It also appears this utilizes suexec.

If this is so, anyone have any pointers on how to do this?


THANKS B-)


Thank YOU...
:)
Eric
 
Last edited by a moderator:
I have the Answer

If anyone else has this problem, whether it's Wordpress, Joomla, Drupal, or any other CMS, or any other dynamic site using php scripts for that matter which are trying to write to files or upload files to the server, here's the answer:

http://wiki.mediatemple.net/w/DV:Run_PHP_as_FastCGI_and_resolve_Apache_permission_errors.

What is comes down to is that the php script that is trying to write the files to the server does not have permission to do so because it is being executed by Apache as a module. When you set it up as FastCGi and use suexec the right way, Apache now runs php using the domain user. See the above thread.

Cheers

B-)
 
Back
Top