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
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: