• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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