• 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

Resolved Write permissions and remote DB

benderzuelo

New Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
Plesk Obsidian Versión 18.0.53
Hello colleagues,


I have several problems, I will try to be brief and get to the point.

PROBLEM 1: In Plesk whenever I develop any application that has the ability to create folders, although in the creation with PHP I give permissions never let me create folders unless through FTP I put the permissions always 777. In other panels like cPanel this never happens to me.
PROBLEM 2: Related to PROBLEM 1, not having permissions, WORDPRESS does not update its plugins or the Core or anything else.
PROBLEM 3: I cannot connect to remote database from another domain of the same server, to another one. When creating the database I checked the option "allow connections from other hosts" and in the PLESK firewall this option is also checked, however it rejects the request.

I don't have much knowledge, but I understand that they are all permissions problems, what I don't understand is why it doesn't obey me at all.

Thanks in advance.
 
Last edited by a moderator:
1) The folders are owned by the subscription user and group psacln. The parent folder must have write permissions for either the owner, the group or both, e.g. 0644 will do or 0664 or more permissions. Permissions for other users are not needed. It will not be possible to modify permissions or access folders outside your own subscription if open_basedir restrictions are in effect. In order to find the root cause why your PHP script cannot create folders, it is suggested to set error_reporting(E_ALL) in your PHP script and to check the error_log after the error occurs.

2) This sounds as if the document root directory permissions are insufficient. They need to be 0750 the least. The directory must be owned by the subscription user and by the group psaserv.

3) Depending on the version of MariaDB you are using, you need to also either remove the "bind-address" line from /etc/my.cnf (version 10.6 an newer) or replace the "bind-address" line with "bind-address = ::". Then restart MariaDB. Else the database server will only allow connections from localhost.
 
Hello again,

Thank you very much Peter for your help.

The problem of connecting to remote database has been solved by commenting the line that you have indicated that already existed thanks.

The permissions both in WordPress and in own applications when creating folders or update came from having uploaded the files with the ROOT user.

I have created an FTP only for the domain itself, I have uploaded the files again and WordPress already updates well and my apps can create folders.

Thanks for your help.
 
Last edited by a moderator:
Back
Top