According to Bruce D. Meyer:
> I spent the majority of this weekend trying to figure out what ht://Dig
> wouldn't work properly under RedHat 6.2. I 'think' I finally figured out the
> apparently the rest of the world must install Apache under /opt/www/,
> whereas an Apache rpm places it to run under /home/httpd.
> While reading the FAQ and various postings I found reference to an rpm.
It's actually very common practise, when setting up RPMs, to change
installation paths to be different from the package's defaults, and to
make them more compliant with the target system's directory layout.
I followed this practice in making the htdig RPMs, and Red Hat did
likewise when they packaged up htdig for the Red Hat 7.0 Powertools
(and presumably 7.1, though I didn't check).
> I deleted all traces (I hope) of the various tarballs I had compiled, and
> installed the rpm. I noticed the following:
>
> every time I run rundig, it changes the permission of two subdirectories
> files to 600 and everything else, with no other user or group type of
> access. I would change the perms to the 644 and once again searches would
> run.
>
> The two directories affected are:
>
> /var/lib/htdig/common/
>
>
> I get this error:
>
> /var/lib/htdig/common/word2root.db (and once I change the perm on the
>
> /var/lib/htdig/db/
>
> I changed all the files under /var/lib/htdig/db/
>
> to 644
> and change
>
> /var/lib/htdig/common/word2root to 600, and that seems to fix it. (Until the
> nest time I run rundig.
It's generally not a good idea to do web site maintenance with your
umask set to 77! You don't want read permissions turned off by default
on any files you create it what should be a publicly viewable area.
Set your umask to 2 or 22, and you'll find you have a lot less grief
with permission problems on the site. Then, you can go over things and
read protect only the stuff you think should be read protected.
> I noticed a difference between rundig with the rpm and the tarball.
>
> With the tarball, I could just enter rundig, and it would see in the conf
> file where I have given it an external url, and it would index that url.
> With the rpm version nothing I do short of deleting the db files seems to
> cause the database to be remade from scratch.
>
> I said at the beginning I was a newbie. Please forgive the stupidity of
> these question if they are indeed dumb. I am still trying to find answers in
> the voluminous documentation that applies to my exact situation.
>
> The rpm used was:
> htdig-3.1.5-0glibc21.i386.rpm.
Presumably you got that RPM from the htdig.org site. In which case, it's
one that I put together. In this RPM, the rundig script is pretty much
the same as the rundig script installed by the tarball. It passes the
-i option to htdig, so it should always reindex from scratch.
However, the RPM sets everything it installs to be owned by root.
If you run "rundig" as root, everything should work. If you run rundig
as a non- privileged user, you're bound to run into permission problems
unless you set things up initially to allow non-root access to the
database directory. Also, you'll normally need to run rundig as the
same user all the time, or you likely won't have write access to the
database the next time you run as a different user.
It sounds to me like you need to familiarize yourself more with Linux
file permissions, ownerships and groups, and umasks. I can't think of
anything else that would explain the problems you're running into.
> RedHat 6.2 with about 99% of everything installed on a test system,
> including every rpm from the RedHat errata, update site as of Thursday last
> week., hardened with Bastille Linux beta 1.20 rc3.
I'm not familiar with Bastille Linux, but if it's a security related thing,
that may somehow be affecting rundig.
--
Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba Phone: (204)789-3766
Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html