[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Permissions and updatedb (WAS:Re: flashplayer9? (Mystery solved))



Ron Johnson wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/16/06 21:17, Marc Shapiro wrote:
David Jardine wrote:
On Sat, Dec 16, 2006 at 12:27:48PM -0800, Marc Shapiro wrote:


Yes, but there are actually quite a few hidden configuration
directories that are set with permissions of 700.  I can see that
this prevents anyone else from viewing your configs, but I don't see
a danger in that (viewing, but not changing).  I could just change
all of them from 700 to 755.  Then updatedb would find them all and
locate will actually get everything, until the next time that some
program creates its config directory with a 700 permission.
You might find that some programs (fetchmail is an example I can think
of) refuse to run if permissions on the config files are not strict
enough.
This is why I would prefer to simply change updatedb.conf so that
updatedb runs as 'root' instead of as 'nobody'.  If no one can give me a
good reason not to, then that is what I will do.

Security rule #2 : Don't run as root unless you *really* need to,
like touch the h/w.  Otherwise, use groups.

Instead of having slocate run as root, find out why ~/.mozilla/ is
set to 700.  BTW, mine is set to 700 also.  Probably because of
passwords.
As I said before, it is not just ~/.mozilla/

ALL of the following directories in my home directory have permissions set to 700:

.skype
.aptitude
.config
.dillo
.gconf
.gconfd
.gnupgp
.jpilot
.macromedia
.mozilla
.mozilla-thunderbird
.openoffice.org2
.thunderbird

I would bet that some of them are going to check their permissions at run time and complain if they are set too lax. So changing the permissions of every directory to 755 is not really a viable solution. Besides, if all of these programs set their directories this way, then others probably will in the future and the problem will rear its ugly head again, when I least expect it.

Maybe, as I also said before, I'll just go back to using find instead of locate. Since find actually searches the directory tree instead of the locatedb it is not dependent on the permissions at the time that updatedb is run. If I need to 'find' files that are not under ~/ I run find with sudo, so the permissions are not a problem there, either. I guess I am just not as paranoid as many people here (which doesn't mean that everyone is not out to get me -- I know).

--
Marc Shapiro
mshapiro_42@yahoo.com




Reply to: