WHM

WHM Cpanel sshd: /var/empty/sshd must be owned by root and not group or world-writable

 

Error: WHM Cpanel sshd: /var/empty/sshd must be owned by root and not group or world-writable is reported via email notifications.

Note: Our server is running Centos

 

Server cpanel2.interactivewebs.com
Primary IPAddress xxx.xxx.xxx.xxx
Service Name sshd
Service Status failed ⛔
Notification The service “sshd” appears to be down.
Service Check Method The system’s command to check or to restart this service failed.
Number of Restart Attempts 19
Service Check Raw Output (XID cg7fzv) The “sshd” service is down.

The subprocess “/usr/local/cpanel/scripts/restartsrv_sshd” reported error number 3 when it ended.
Startup Log Dec 07 02:34:37 xx.interactivewebs.com systemd[1]: Failed to start OpenSSH server daemon.
Dec 07 02:34:37 xx.interactivewebs.com systemd[1]: Unit sshd.service entered failed state.
Dec 07 02:34:37 xx.interactivewebs.com systemd[1]: sshd.service failed.
Log Messages Dec 7 02:34:37 cpanel2 sshd: /var/empty/sshd must be owned by root and not group or world-writable.
Memory Information
Used 1.12 GB
Available 14.01 GB
Installed 15.13 GB
Load Information 0.00 0.01 0.07
Uptime 1 hour, 30 minutes, and 42 seconds
IOStat Information avg-cpu: %user %nice %system %iowait %steal %idle 4.15 0.01 0.18 0.02 0.00 95.64 Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn sda 7.43 185.24 24.84 1007925 135152 dm-0 4.69 146.09 17.67 794896 96128 dm-1 0.02 0.41 0.00 2228 0 dm-2 2.62 33.66 6.80 183144 36976
Top Processes
PIDOwnerCPU%Memory %Command
5182 root 18.07 0.09 /usr/local/cpanel/scripts/restartsrv_cpanel_dovecot_solr
5080 root 5.88 0.17 tailwatchd - chkservd - cpanel-dovecot-solr check
5138 root 1.20 0.01 dovecot/auth -w
5167 root 0.72 0.00 [whostmgrd - ser]
5108 dovecot 0.68 0.02 dovecot/auth

 

The Fix

1. Login to WHM and click on terminal

Screenshot 2018 12 07 21 36 49

Type these 3 commands into there terminal window:

# chown root:root /var/empty/sshd 
# chmod 711 /var/empty/sshd 
# ls -ld /var/empty/sshd

 

2. Restart the ssh Daemon in WHM

WHM ssh