LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-28-2004, 08:17 AM   #1
bluesman2333
Member
 
Registered: Dec 2003
Location: Phoenix, Az.
Distribution: Xubuntu Edgy
Posts: 330

Rep: Reputation: 30
Post 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)
 
Old 12-06-2011, 12:43 AM   #2
nikunjkondra
LQ Newbie
 
Registered: Dec 2011
Posts: 3

Rep: Reputation: Disabled
Lightbulb 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)
 
Old 12-06-2011, 12:53 AM   #3
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,013

Rep: Reputation: 83
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)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LQ Would Like Original Articles XavierP Linux - News 4 12-03-2005 01:12 PM
Problem with permissions reverting to original setting preacherman481 Linux - General 1 03-30-2005 09:14 AM
/etc/ original permissions bluesman2333 Linux - Newbie 2 01-28-2004 08:30 AM
Original Project slinkyredfoot Linux - General 2 09-27-2003 07:30 PM
Original Distrobutions? TX_metalhead Linux - Distributions 16 02-07-2002 01:33 PM


All times are GMT -5. The time now is 08:53 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration