Global permission issues, all sites are down

I have been with hestia for several months and had not had any problem, but without wanting to, I was interacting as root and I ran the following command sudo chown -R admin: admin to try to solve a small problem with one of the webs … But from there everything gives error 500, I can not even enter the hestia control panel, the background of the login even changed color to a light blue, the login does not work, either … Any ideas ??? I have more than 7 projects in production in that VPS !!! Help!!!

Easiest solution:

Pull the existing backups and setup a new server and import the backups again.

If you have snapshots restore to the last snapshot.

If that doesn’t work or they are to old you have to change the permissions to the correct one but can take hours…

1 Like

Where do I find the hestia backups?

usualy /backups, you can also create new backups with v-backup-users, but maybe not run it before you saved the current backups, they may get overwritten.

I think that you could try this:

touch fix.sh && chmod +x fix.sh && nano fix.sh

Paste this text into fix.sh

#!/bin/bash
cd /home
for d in / ; do
chown -R $d:$d /home/$d/

#additional ownerships to be changed here
chown -R root:root /home/$d/conf/*
chown root:root /home/$d/conf
chown -R root:root /home/$d/mail/*
chown root:root /home/$d/mail
done
echo “Done!”

Then:

./fix.sh

I have not tested it myself but it should do the job.

Thats not a good idea at all, there are different ownership sets - also for /home/user/conf.

He has only reset ownership, not permissions

Anyway, do as @ScIT says. He is much more experienced than me.

1 Like

Corrected my post, meant ownership.

I have updated the script to fix the conf and mail directories but as said… try this only if you cant get the backups working again.

I think other folders outside /home have been altered otherwise he should not have trouble logging into the panel

2 Likes

Not working for me… I reinstall the vps, already made the backup in another vps

1 Like

Finally this is what I did, All good !! … Thank you all very much for your time

2 Likes