1753816 Members
8416 Online
108805 Solutions
New Discussion юеВ

/etc/resolv.conf

 
SOLVED
Go to solution
joe_91
Super Advisor

/etc/resolv.conf

Hi There:

We currently have the resolv.conf file permission as 666. Ok. we are going to change it to 644.My questions..
1. is 644 OK?
2. what are the side effects of 666 (other than some one can play around with the file), I mean will it have resolving issues etc..

Thanks in advance,

Joe.
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor
Solution

Re: /etc/resolv.conf

Hi Joe:

Yes, 666 is far too dangerous. Permissions of 644 or even 444 (since you can still edit it as 'root') are far more appropriate and safe.

Regards!

...JRF...
Steven Mertens
Trusted Contributor

Re: /etc/resolv.conf

hi,

I assume no trouble if you change the
permission to 644.

regards.

Steven
RAC_1
Honored Contributor

Re: /etc/resolv.conf

No problems with that. 666 is more open to users.
There is no substitute to HARDWORK
S.K. Chan
Honored Contributor

Re: /etc/resolv.conf

Mine's at 444 ( I suppose that's minimum requirement ) so changing it to a "wider" access permission should not have any "resolving" issues. 644 is OK, nothing more than that.
MANOJ SRIVASTAVA
Honored Contributor

Re: /etc/resolv.conf

Hi Joe

It should be set to readable only bcoz the system looks for the same , nay thing other tahn taht has its own weaknesses.


Manoj Srivastava
joe_91
Super Advisor

Re: /etc/resolv.conf

Thanks.

Joe.
papatot
Occasional Advisor

Re: /etc/resolv.conf

If think 444 is OK! Beside edit it , users(include root) only read it when necessary.

papatot.
Bill Hassell
Honored Contributor

Re: /etc/resolv.conf

Just a note about system security. Every file *and* directory that is world writable cannot be trusted! The hacker's favority tool is the ability to change ordinary files into something else and for this, all that is needed is write permission to the directory or file. 666 and 777 are VERY bad permissions and when discovered, the affected files and directories should be carefully examined for content. The exceptions are /tmp and /var/tmp which must be 777 but more appropriately, 1777 (which requires the owner in order to delete or rename an entry in the directory).

The most common causes for bad permissions are:

- some process complains about permissions and a bunch of files are changed to 777 in hopes of solving the problem. Usually, it doesn't but the permissions are left open anyway.

- umask has never been set. This is an absolute requirement for every Unix system and must be set for every user as: umask 077 or slightly less secure, umask 022. Make sure umask is set in /etc/profile and /etc/csh.login


Bill Hassell, sysadmin
Balaji_6
Advisor

Re: /etc/resolv.conf

Hi Joe,

The sideeffect using 666 is the goup and other users in that machine can also modify /etc/resolv.conf file.

It is safe to have the permission as 444.
By default the permission for /etc/resolv.conf file is 644.

-Balaji

THE WORD IMPOSSIBLE ITSELF SAYS I'MPOSSIBLE