• 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 Plesk 12.0.18 in Debian 7.8 all permissions server-wide set to root:root

gxe

New Pleskian
Hi everyone, I hope you got a great Christmas.

I got a fully working Plesk 12.0.18 in a Debian 7.8 machine, it was working great for more than a year, got there e-mails, webmail, simple HTML sites, PHP sites and Wordpress. Everything just running fine.

On Dec 24 I was trying to install Mautic, after downloading it from the server using smth like
wget http://mautic-install-link
I unzipped it and was trying to set correct permissions because I was running as ROOT (yes, I know I should follow the good practices but didn't follow them that day)
By mistake I did
chown -R root:root /*
instead of
chown -R domainuser:domaingroup /var/www/vhosts/domain.com/httpdocs/*

Immediately realized what a huge mistake I did, and that Christmas would be spent sitting in front of the PC trying to fix it. Server immediately stopped responding on sites, Plesk admin panel stopped, e-mails stopped getting in and out, no connection could be made on IMAP or SMTP...
So 99% of server contents got rights root:root on all files and folders of my wonderful server.

After 2 days of working with it, reading through many forum links, Plesk guides (including the command to restore rights /usr/local/psa/bin/repair --restore-vhosts-permissions) and setting up a test VM with Debian 7.8 and Plesk 12.0, I finally managed to set correct permissions on most files and folders so at least:
  1. Websites started working
  2. IMAP and SMTP connection began working
  3. E-mails incoming normally
  4. E-mails sending normally
  5. Wordpress sites were being recognized by Plesk panel (before they were showing as not attached)
Now I am stuck at the following issues because I could not find enough info, and my test Debian & Plesk VM did not provide such data:

1-When I try to login at Plesk panel (https://domain.com:8443) I get the login page normal. Upon logging in I get a blank page with HTTP ERROR 500 and URL is https://domain.com:8443/login_up.php3
If I try to navigate manually to https://domain.com:8443 the Plesk admin opens normally and I can do management of site. This was not happening before of global server-wide CHOWN so should be some wrong permissions somewhere.

2-When I logout from Plesk panel I am forwarded to URL https://domain.com:8443/logout.php3 with the following error:
ERROR: Allowed memory size of 268435456 bytes exhausted (tried to allocate 64 bytes) (Json.php:122)
Looking at logfile located on /var/log/plesk shows:
[WARNING] [User] x.x.x.x Specified log file /opt/psa/var/modules/plesk-mobile//MobileConnector.log is not writable.
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32 bytes) in /opt/psa/admin/externals/Zend/Config/Json.php on line 122
Maybe both these logs apply to login and logout problem I have with Plesk panel?
This was not happening before of global server-wide CHOWN so should be some wrong permissions somewhere.

3-Roundcube webmail shows just a blank page and nothing else.
Logfile at /var/log/apache2/error.log shows:
[warn] [client x.x.x.x] mod_fcgid: stderr: PHP Warning: Error writing to log file /usr/share/errors; Please check permissions in /usr/share/psa-roundcube/program/lib/Roundcube/rcube.php on line 1339
[warn] [client x.x.x.x] mod_fcgid: stderr: PHP Warning: Configuration error. Unsupported database driver: in /usr/share/psa-roundcube/program/lib/Roundcube/rcube.php on line 1441
I tried to switch webmail system from Roundcube to Horde, again the same blank page. Again, this was working normally before my stupid mistake of server-wide CHOWN.

Please, can someone help and let me know for above problems what files & folders should I check and what ownership should I be having in each of these?
Please take me out of the misery of working with the server since evening of Dec 24th until now for 12-14 hours and very small sleep just to get important services running...

Thanks and happy holidays everyone
 
I suggest to reinstall the operating system, then Plesk, then restore Plesk contents from your backup, because the system can have tens of thousands of directories and files. I have serious doubts that it is possible to manually reconfigure the correct group and owner settings of all files. You'd need to check each file individually against a default installation, because you can never be sure whether file no. 34657 in sub-sub-sub-directory no. 2194 doesn't need an extra permission or ownership setting ...
 
Hi Peter, thanks for your reply. Actually I managed to get Plesk Panel also working fine without any error 500 just by testing with ownerships and many restarts (I may post later on the steps I followed to get that working), so I can login and logout just like before.
I believe that is possible because I did that from scratch using any information found over internet and by setting up a similar system in a VM.
Now I have just to solve point 3 so Horde or Roundcube start working normally as they used to be before.
If you or anyone else here may provide me at least a full list of files and directories with owner:group for a stable machine running Debian 7.8 and Plesk 12.0.x and has Roundcube configured in at least one domain, I will find it.
I do not want to mess with any installation, uninstall, upgrade or restore because I have no missing files at all. I am just missing ownership rights for Roundcube webmail
 
I need something like this at least:
find . -exec ls -dl \{\} \; | awk '{print $3, $4, $9}' > list.txt
So it will dump all files and directories along with owners and groups in list.txt
 
A bit late now, bu if it's just Horde/Roundcube, I'd start by removing them from the Plesk Updates and Upgrades page, then re-install. That won't affect user data.
 
Actually, against all the odds, I managed to get it back working just like it was before!
For anyone else in my shoes in the future, this is a default list permissions list for all files in a default system with Debian 7.8 and Plesk v12.0.18 :
http://pastebin.com/4fySEmHs

As a reference, change all files and folders owner and group to ROOT:ROOT then change just the files which have different owners.
It's quite a long list but with Notepad++ or Excel you can edit it easily to leave just the lines which have different owner or group from ROOT.

But it's a proven solution, the system is running perfectly now, just change all these owners and groups just like the list and many reboots...
 
Back
Top