Original /etc/ permissions help please
I wanted to append my hosts file, so I changed the permissions to do so. This was before I caught on to the idea of starting another session as root and doing root things in root, not as the user. I failed to get them back as original. When I change to anything more restrictive than 755, I can't start the session on boot. Can anyone clue me in on what they are? Also, it seems that cron is failing to start, but do not notice any ill effects from that.
Here is the start log: Starting virus-scanner (amavisd-new):done Starting sound driver: opl3sa2done @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0755 for '/etc/ssh/ssh_host_rsa_key' are too open. It is recommended that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_rsa_key @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0755 for '/etc/ssh/ssh_host_dsa_key' are too open. It is recommended that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key Could not load host key: /etc/ssh/ssh_host_dsa_key Disabling protocol version 2. Could not load host key Restoring the previous sound settingdone Loading OPL3 patches std.o3 and drums.o3 (65:0)done <notice>exit status of (sshd smpppd fbset amavis alsasound acpid) is (0 0 0 0 0 5) -------------------------------------------------------------------------------------------------- <notice>start services (nscd hwscan cron) <notice>Starting hardware scan on bootStarting Name Service Cache Daemonfailed Starting CRON daemonfailed startproc: execve (/usr/sbin/nscd) [ /usr/sbin/nscd ], [ CONSOLE=/dev/console TERM=linux SHELL=/bin/sh progress=38 INIT_VERSION=sysvinit-2.82 REDIRECT=/dev/tty1 COLUMNS=148 PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin vga=0x31a RUNLEVEL=5 PWD=/ PREVLEVEL=N LINES=51 HOME=/ SHLVL=2 splash=silent sscripts=42 _=/sbin/startproc DAEMON=/usr/sbin/nscd ] <notice>startproc: execve (/usr/sbin/cron) [ /usr/sbin/cron ], [ CONSOLE=/dev/console TERM=linux SHELL=/bin/sh progress=38 INIT_VERSION=sysvinit-2.82 REDIRECT=/dev/tty1 COLUMNS=148 PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin vga=0x31a RUNLEVEL=5 PWD=/ PREVLEVEL=N LINES=51 HOME=/ SHLVL=2 splash=silent sscripts=42 _=/sbin/startproc DAEMON=/usr/sbin/cron ] Pid_file "/var/spool/amavis/amavisd.pid" already exists. Overwriting! <notice>exit status of (nscd hwscan cron) is (7 0 7) <notice>start services (xdm splash_late) Starting service kdm<notice>startproc: execve (/opt/kde3/bin/kdm) [ /opt/kde3/bin/kdm ], [ LC_MONETARY= CONSOLE=/dev/console TERM=linux SHELL=/bin/sh LC_NUMERIC= QTDIR=/usr/lib/qt3 LC_ALL= progress=41 INIT_VERSION=sysvinit-2.82 KDEROOTHOME=/root/.kdm REDIRECT=/dev/tty1 COLUMNS=148 PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:. LC_MESSAGES= vga=0x31a RUNLEVEL=5 LC_COLLATE= PWD=/ LANG=en_US PREVLEVEL=N LINES=51 HOME=/ SHLVL=2 XCURSOR_THEME=blueprint-cursor-theme no_proxy=localhost WINDOWMANAGER=/usr/X11R6/bin/kde LC_CTYPE=en_US splash=silent sscripts=42 LC_TIME= _=/sbin/startproc DAEMON=/opt/kde3/bin/kdm ] done <notice>exit status of (xdm splash_late) is (0 0) Master Resource Control: runlevel 5 has been reached Failed services in runlevel 5: nscd cron Skipped services in runlevel 5: smbfs acpid <notice>killproc: kill(662,3) |
Solution: Unable to start ssh / cannot connect to CentOS through putty or FileZilla(ftp)
Hi,
It happens when the permissions of files in /etc/ssh/ get changed. Restore back the permissions of all the files in this folder as done below. #cd /etc/ssh/ #chmod 600 moduli #chmod 644 ssh_config #chmod 644 ssh_host_dsa_key.pub #chmod 644 ssh_host_key.pub #chmod 644 ssh_host_rsa_key.pub #chmod 600 ssh_host_dsa_key #chmod 600 ssh_host_key #chmod 600 ssh_host_rsa_key #chmod 640 sshd_config and finally /etc/init.d/sshd start (and/or) /etc/init.d/sshd reload This should solve the problem.Cheers. You should also be able to connect through putty /FileZilla to this server.(May be useful for others who had the same problem and were unable to connect through these tools) |
Directories should be 755
files should be 644 There are exceptions for example shadow and gshadow should be 640 chatscripts is set to 2740 (set group id) |
All times are GMT -5. The time now is 12:50 PM. |