• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Wordpress and directory permissions

jms123

New Pleskian
We have multiple domains being managed by Plesk, some of them have wordpress which is managed within Plesk and some have wordpress which is managed outside of Plesk (but the domain is still managed within Plesk).

The issue is with wordpress managed outside of Plesk and updates failing.

As far as I can tell this is because the update process runs as apache and that user has no permissions to write to directories within the domains.

I don't want to chmod 777 everything so the only thing I can think of is to add the apache user to the psacln group and then chmod 775 the wordpress directories.

Couple of questions -

1) is this the best approach or is there a much easier way to do it

2) are there any consequences to adding apache to the psacln group ?

Thanks

Jon
 
We have multiple domains being managed by Plesk, some of them have wordpress which is managed within Plesk and some have wordpress which is managed outside of Plesk (but the domain is still managed within Plesk).

The issue is with wordpress managed outside of Plesk and updates failing.

As far as I can tell this is because the update process runs as apache and that user has no permissions to write to directories within the domains.

I don't want to chmod 777 everything so the only thing I can think of is to add the apache user to the psacln group and then chmod 775 the wordpress directories.

Couple of questions -

1) is this the best approach or is there a much easier way to do it

2) are there any consequences to adding apache to the psacln group ?

Thanks

Jon

Hello,
If your domain are managed by Plesk, I do not understand why your wordpress websites (managed outside of Plesk) do not use the same user:group than your wordpress websites managed by Plesk ?
In subscription, sites's files should be owned by : susbscription-user:psacln, WordPress folder permission should be 755 and files permissions 644.
It shouldn't be a problem to update wordpress with those settings.
 
Hi

They do use the same user:group combination (subscription-user, psacln) and that is the problem as far as I can tell.

When Plesk does not control wordpress when wordpress updates as far as I know the user it runs as is apache and the apache user does not have permissions to write to the wordpress directories because they have the "subscription-user, psacln" user/group settings.

Or have I got that wrong and wordpress is not running as apache ?
 
Apache can access and modify all files hat belong to group psacln, unless those files are read only.
 
Hi Peter

Thanks for that, clears a few things up.

The Wordpress directories are 755 so on the group settings that means no write permissions for apache which I think is the issue because the domains within plesk have a "subscription-user:psacln" owner/group setup.

So would just changing to 775 for the domains where wordpress is outside of Plesk's control fix the issue ?

Hope that makes sense.

Jon
 
Hi Peter

Thanks for that, clears a few things up.

The Wordpress directories are 755 so on the group settings that means no write permissions for apache which I think is the issue because the domains within plesk have a "subscription-user:psacln" owner/group setup.

So would just changing to 775 for the domains where wordpress is outside of Plesk's control fix the issue ?

Hope that makes sense.

Jon

Hello @jms123,

this is not related to apache user/group, because each subscription use his own php-fpm pool with Plesk (with subscription-user:psacln) and not apache mod_php. Apache2 user:group is www-data:www-data, but apache is able to access to your site files because httpdocs folder group is psaserv.
Changing permissions to 775 will not fix the issue. From the command line, you can apply proper permissions with :
Code:
cd /path/to/wordpress/folder 
find -type d -exec chmod 755 {} \; 
find -type f -exec chmod 644 {} \;
 
They already have those permissions so that will not fix it.

All I know is wordpress sites where there is a wordpress instance in Plesk work fine but wordpress sites that do not have an instance in Plesk but the domain is still managed by Plesk do not work.

I can't work out why.
 
Back
Top