Operating System - HP-UX
1833858 Members
3005 Online
110063 Solutions
New Discussion

Impacts of /etc/hosts Permission

 
morganelan
Trusted Contributor

Impacts of /etc/hosts Permission

Hi unix gurus,
What do the impacts if I change the /etc/hosts permission to 400??Thanks in advance.
Kamal Mirdad
11 REPLIES 11
RAC_1
Honored Contributor

Re: Impacts of /etc/hosts Permission

Not good. Applications/programs, that want to do name search (if that you use for host name resolution), it will run into problem. Perms 444 are better.
There is no substitute to HARDWORK
Luk Vandenbussche
Honored Contributor

Re: Impacts of /etc/hosts Permission

I wouldn't do it.
If a normal user can't perform a name resolution through /etc/hosts anymore
Arunvijai_4
Honored Contributor

Re: Impacts of /etc/hosts Permission

It's better to go with 444 for /etc/hosts since normal users cant read with 400.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Zigor Buruaga
Esteemed Contributor

Re: Impacts of /etc/hosts Permission

Hi,

The applications that ask hosts file will not be able to read it.
I think HP says that it should be 0444.

Regards,
Zigor
melvyn burnard
Honored Contributor

Re: Impacts of /etc/hosts Permission

I have seen Oracle fail due to inabillity to read the hosts file.
Don't do it, rather have 444 as the permissions
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Sudeesh
Respected Contributor

Re: Impacts of /etc/hosts Permission

I wouldn't do it. If a program run by normal user want to access it, 400 may create issues. I will stick with the default 544.

Sudeesh
The most predictable thing in life is its unpredictability
morganelan
Trusted Contributor

Re: Impacts of /etc/hosts Permission

Which application needs /etc/hosts ? Thanks in advance ...
Kamal Mirdad
Muthukumar_5
Honored Contributor

Re: Impacts of /etc/hosts Permission

It is good to keep default setting of 444 to /etc/hosts and related configuration files like /etc/nsswitch.conf or /etc/resolv.conf.

It is giving permission of read to all. You can change 400 also when no can even read that except root user.

hth.
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: Impacts of /etc/hosts Permission

Many applications like Oracle, Jboss, Weblogic, apache, etc.. requires to read /etc/hosts.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Joseph Loo
Honored Contributor

Re: Impacts of /etc/hosts Permission

hi,

don't. 444 (bin:bin) will do.

application like Oracle, etc requires to read /etc/hosts.

regards.
what you do not see does not mean you should not believe
morganelan
Trusted Contributor

Re: Impacts of /etc/hosts Permission

many thanks all of you ....
Kamal Mirdad