Accidentally deleted entire /usr/sbin folder in cpanel, how to mitigate damages / recover?

خرید بک لینک

The problem with working too late. In ssh I was trying to remove a folder I created in /usr/sbin but forgot to add the folder name so thus the entire sbin folder was instantly deleted. I do not have a backup of this folder (only of cpanel accounts).

I did this by accident:

rm -rf /usr/sbin

Immediately the server was still fine. However, named would not restart. A couple hours later, the server went down. However, even though the server was down, httpd was still running. Well, eventually I got it up again by removing and reinstalling sshd and also reinstalling named and tweaking a couple things to get named started.

Since creating this stupid mistake, I have had to do numerous things:

remove and reinstall sshd
reinstall csf
reinstall named (and solve other issues to get it reinstalled)
reinstall watchmysql
and others.

I also did /scripts/upcp --force to try to get cpanel to reinstall any missing files.

However, I did look and sbin still only has a few symbolic links, instead of like 30 or more symbolic links that it had before deleting the folder. I'm worried these missing symbolic links will cause issues. Also I don't know what else might be missing.

So far the only service that appears to be giving an issue is nscd which refuses to start. Trying to check it or restart nscd service gives me nothing. See;

# service nscd restart
# service nscd status
# service nscd start
#

As you see it just goes to the next line with nothing retued.

Also ftpd status retus unrecognized, although for this one I'm not sure if maybe ftpd is called something else.

# service ftpd status
ftpd: unrecognized service

Also please note I have been trying to get r1soft to work but for now I do not have a full backup of the server; obviously that would be the easiest way but that isn't an option at this time.

I got r1soft to hopefully mitigate the issue, but I couldn't get r1soft working before this problem occurred. In the future I'll have the server fully backed up for such issues, but for now I don't have that option.

Please help. I am inside of cpanel and sites are up now but I don't know if it will go down later or possibly have even more serious issues later.

Update: Also see the following issue:

# /usr/local/cpanel/scripts/check_cpanel_rpms --fix
[2016-08-06 15:28:32 -0700]
[2016-08-06 15:28:32 -0700]   Problems were detected with cPanel-provided files which are RPM controlled.
[2016-08-06 15:28:32 -0700]   If you did not make these changes intentionally, you can correct them by running:
[2016-08-06 15:28:32 -0700]
[2016-08-06 15:28:32 -0700]   > /usr/local/cpanel/scripts/check_cpanel_rpms --fix
[2016-08-06 15:28:32 -0700]   The following RPMs are missing from your system:
[2016-08-06 15:28:32 -0700]   cpanel-mailman-2.1.21-12.cp1158
[2016-08-06 15:28:53 -0700]   Removing 0 broken rpms:
[2016-08-06 15:28:53 -0700]   rpm: no packages given for erase
[2016-08-06 15:28:55 -0700]   Downloading http://httpupdate.cpanel.net/RPM/11.58/centos/6/x86_64/rpm.sha512
[2016-08-06 15:28:55 -0700]   Successfully verified signature for cpanel (key types: release).
[2016-08-06 15:28:55 -0700]   cpanel-mailman-2.1.21-12.cp1158.x86_64.rpm already downloaded
[2016-08-06 15:28:56 -0700]   Disabling service monitoring.
[2016-08-06 15:28:57 -0700]   Hooks system enabled.
[2016-08-06 15:28:57 -0700]   Checking for and running RPM::Versions 'pre' hooks for any RPMs about to be installed
[2016-08-06 15:28:57 -0700]   All required 'pre' hooks have been run
[2016-08-06 15:29:04 -0700]   No RPMS need to be uninstalled
[2016-08-06 15:29:04 -0700]   Installing new rpms: cpanel-mailman-2.1.21-12.cp1158.x86_64.rpm
[2016-08-06 15:29:04 -0700]   Preparing packages for installation...
[2016-08-06 15:29:04 -0700]   uid=99(nobody) gid=99(nobody) groups=99(nobody)
[2016-08-06 15:29:04 -0700]   uid=8(mail) gid=12(mail) groups=12(mail),496(mysyslog)
[2016-08-06 15:29:04 -0700]   /var/tmp/rpm-tmp.wE4wtO: line 46: /usr/sbin/usermod: No such file or directory
[2016-08-06 15:29:04 -0700]   /var/tmp/rpm-tmp.wE4wtO: line 48: /usr/sbin/usermod: No such file or directory
[2016-08-06 15:29:04 -0700]   error: %pre(cpanel-mailman-2.1.21-12.cp1158.x86_64) scriptlet failed, exit status 127
[2016-08-06 15:29:04 -0700]   error:   install: %pre scriptlet failed (2), skipping cpanel-mailman-2.1.21-12.cp1158
[2016-08-06 15:29:04 -0700] W Error Code: 1
[2016-08-06 15:29:04 -0700] E The following possible errors were detected while installing RPMs:
[2016-08-06 15:29:04 -0700] E %pre(cpanel-mailman-2.1.21-12.cp1158.x86_64) scriptlet failed, exit status 127 install

So apparently the usermod folder was one of the folders in sbin which due to now being missing is also causing issues.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: , accidentally deleted entire conversation on iphone , accidentally deleted entire inbox , accidentally deleted entire itunes library , accidentally deleted entire gmail inbox , accidentally deleted entire company , , نویسنده: استخدام کار بازدید: 373 تاريخ: يکشنبه 17 مرداد 1395 ساعت: 10:29

صفحه بندی