• 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.

Issue Plesk hs following a false manipulation

houss2712

New Pleskian
Server operating system version
CentOS 7
Plesk version and microupdate number
last
Good morning,
Following a false ssh manipulation, when trying to chmod a site, my Plesk Obsidian Linux server (Centos 7) is out of order
I think that the User and the permissions of certain folders have been modified unintentionally, but impossible to repair and my knowledge on the subject is limited.
Only way to access ssh is in rescue mode, and I don't know how to fix file permissions.
If a kind soul could help me recover my server, without losing my sites, that would be really great.
Thanks in advance
 
There is no such command in Plesk. Maybe you are referring to a feature that your provider offers? In that case, please contact your provider for assistance.

Did plesk repair fs not work for you?
 
I'm in Rescue mode and I don't know if I'm taking it well, That's what happens

-bash: plesk: command not found
 
Typically, "rescue mode" at data centers loads an operating system from their local network. In rescue mode you'd need to first mount drives and switch to their root in order to being able to use them. I am not sure whether it is possible to run Plesk from that situation at all. Why do you need rescue mode in the first place? Is the operating system broken so that you cannot start your server at all into the installed operating system?
 
Exactly, the server no longer starts following a Chmod error, I think that the permissions and the folder user have been modified which prevents the server from starting correctly
 
I see. Well, that can be quite tricky. I am not sure whether with mounts Plesk will start, because the operating system that your data center loads via network interface is not the same like the one your fixed installation on the server has. I can outline the steps to gain "maximum" access through a rescue mode system, but the individual steps will depend on your exact configuration, e.g. your partitions etc. So this here can only be an example:

1) Login to rescue system with Linux shell.

2) Then see the available devices:
# ls /dev/[hsv]d[a-z]*[0-9]*
Result could be something like
/dev/sda2 /dev/sda3 /dev/sda4 /dev/sd5

3) Now check which of these is the Linux root / partition (it is /dev/sda4). Mount that partition. We might also need the boot partition if we want to do anything on that, so mount that, too, for example this could be something likke:

# cd /
# mount -t ext4 /dev/sda4 /mnt
# mount -t proc proc /mnt/proc
# mount -t sysfs sys /mnt/sys
# mount -t ext3 /dev/sda2 /mnt/boot

(Again, these are just examples. What you actually mount, what file system etc. depends entirely on your own system. If unsure on the file system type, look it up in /etc/fstab. If unsure about which sda has which content, look it up in fdisk -l.)

4) We normally won’t need the /home partition, but just in case, for the above example it could be something like
# mount -t ext4 /dev/sda5 /mnt/home

5) Now change into the mounted file system:
# chroot /mnt /bin/sh

6) Only if you need to do anything with GRUB, we need to be sure the /etc/mtab file is up-to-date:
# grep -v rootfs /proc/mounts > /etc/mtab

7) From here, Linux commands of the mounted file system should be available.

BUT: When you have changed file permissions on the files, chances are that you won't be able to do much more on the mounted file system, because it will behave just as problematic as the file permissions were set in error.

8) Once you are done, to finish the session:
# exit
# umount /mnt/boot
# umount /mnt/{proc,sys}

(If you mounted other partitions, use them accordingly as the umount parameter.)

A better approach could be to simply wipe and reinstall the system and restore the Plesk content, e.g. websites, databases, email, from a remote backup that you hopefully did.
 
A better approach could be to simply wipe and reinstall the system and restore the Plesk content, e.g. websites, databases, email, from a remote backup that you hopefully did.
They wrote they have the backups on the server. Are they in /var/lib/psa/dumps/ on CentOS 7 too?
 
Yes, if /var/lib/psa/dumps is the backup path defined in psa.conf, then yes. If the DUMP_D variable in /etc/psa/psa.conf has a different content, then they are in that path mentioned there.
 
Back
Top