• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.

Plesk users, ownership and rights

Wizzie

New Pleskian
Hi there guys, i have encountered the following problem:

I have moved a wordpress website from another server and i do not have writing permissions for scripts.
How did i do it.
Zipped the files and exported the database from the old server.
Uploaded the files via FTP (while using the designated user and password), created the database into my server and imported the one i have exported from the old server.
So far so good, the website works fine excepting the fact that all the images are not being processed by the images resizing scripts with the following error "Warning: chmod(): Operation not permitted in /var/www/vhosts...."
While checking for permissions and ownership i've seen that all folders are having as owner "username" with group "psaserv" which i think it should be correct and the folder and files where with the correct rights too.

I tried a different version of import and i discovered something new.
Installed WP from App installer and the moved the wp-content and imported the database information.
After that i had 2 different owner for the files, one being the one mentioned above and one being "www-data" with group "www-data".

I am a bit puzzled about this issue and wondering if you have any suggestions since the image resizer is not working either ways, not even with 777 folder permissions...

Any suggestions that may help me fix this issue?
 
If you use NGINX as well, to serve static files and php - files, you might want to add the system user nginx to the psacln group: usermod -aG psacln nginx
In a standard configuration the system user nginx is already in the group "psasrv", like www-data, but not in the group "psacln", which is the group that owns folders and files over FTP and PHP.

A good idea to avoid owner rights issues when using scripts in a chrooted environment for a domain or subdomain, is to set a custom "open base directory" in the specific php.ini for that domain/subdomain:
Start > Abonnements > YOURDOMAIN.COM > Websites & Domains > YOURDOMAIN.COM > PHP-settings for YOURDOMAIN.COM
Plesk already pre-configured such a setting in the dropdown - menu: {WEBSPACEROOT}{/}{:}{TMP}{/}
... you may add some needed directory ( i.e. a patch to php and php5 ) with: :/usr/share/php:/usr/share/php5

A common used setting is: {WEBSPACEROOT}{/}{:}{TMP}{/}:/usr/local/bin:/usr/share/php:/usr/share/php5:/usr/share/perl:/usr/share/perl5:/usr/bin/python:/usr/bin/python3:/usr/share/psa-pear:/usr/share/psa-horde:/usr/share/psa-roundcube
 
Back
Top