Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130086 - app-misc/beagle problems with beagleinfo user and /var/lib/cache/beagle permissions
Summary: app-misc/beagle problems with beagleinfo user and /var/lib/cache/beagle permi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Luis Medinas (RETIRED)
URL:
Whiteboard:
Keywords:
: 130370 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-15 12:02 UTC by John Reed Riley
Modified: 2006-04-29 11:14 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
beagle-ownership.patch (beagle-ownership.patch,387 bytes, patch)
2006-04-17 02:32 UTC, Pat Double
Details | Diff
beagle-ownership.patch (beagle-ownership.patch,617 bytes, patch)
2006-04-17 19:40 UTC, Pat Double
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Reed Riley 2006-04-15 12:02:59 UTC
When I emerge "app-misc/beagle-0.2.4-r2", I'm left with an installation of beagle with two problems.

First, the "beagleinfo" user has the "/usr/sbin/nologin" shell, which prevents the begal-crawl-system script from generating static indexes correctly.

Also, the directory "/var/lib/cache/beagle" has an incorrect owner.  Here's the output from "ls -lha" for that directory after a clean install:

/var/lib/cache/beagle $ ls -lha
total 0
drwxr-xr-x 3 root        root         72 2006-04-15 14:53 .
drwxr-xr-x 5 root        root        136 2006-04-15 14:50 ..
drwxr-sr-x 2 beagleindex beagleindex  72 2006-04-15 14:53 indexes

As a result, beagle-crawl-system fails as it is unable to create a .wapi directory within it.  As far as I can tell, this can be resolved by having "/var/lib/cache/beagle" be owned by the "beagleindex" user.
Comment 1 Pat Double 2006-04-17 02:32:49 UTC
Created attachment 84824 [details, diff]
beagle-ownership.patch

Patch against beagle-0.2.4-r2 to fix ownership problem of /var/lib/cache/beagle.
Comment 2 Luis Medinas (RETIRED) gentoo-dev 2006-04-17 18:53:47 UTC
no that patch doesn't fix the issue. ls -la /var/lib/cache/beagle
total 0
drwxr-xr-x 3 root        root        20 Apr 18 02:05 .
drwxr-xr-x 4 root        root        39 Apr 18 02:05 ..
drwxr-xr-x 2 beagleindex beagleindex 18 Apr 18 02:05 indexes

About the shell imo it should use nologin otherwise we'll get another invalid user.
Comment 3 Pat Double 2006-04-17 19:40:52 UTC
Created attachment 84873 [details, diff]
beagle-ownership.patch

Hmm.. try this one. It fixes the ownership in post install.

As for the nologin user, that would be great but IIRC it will keep crawling from working. This is a known issue, I have not seen that it is resolved.
Comment 4 Arif Lukito 2006-04-17 19:53:17 UTC
you can use this instead

diropts -o beagleindex -g beagleindex
keepdir /var/lib/cache/beagle/indexes

by looking at eutils.eclass enewuser does not create user home dir
instead it checks whether the home dir exists that set the permission
so /var/lib/cache/beagle does not get created upon issuing enewuser
by using diropts we make sure a new dir created by keepdir uses a right permission (no need for chmod)

Comment 5 Pat Double 2006-04-17 19:57:11 UTC
That's good to know. Will it also set the same permissions for /var/lib/cache/beagle, even though the command is "keepdir /var/lib/cache/beagle/indexes" ? We also need /var/lib/cache/beagle to be owned by beagleindex because mono will create its .wapi directory there. I saw a commit just recently that beagle-crawl creates a temp dir for mono for crawling, but I don't think there's a need to wait for that.
Comment 6 Arif Lukito 2006-04-17 20:01:29 UTC
metalgod what do you mean by "get another invalid user"? mind to elaborate more?
Comment 7 Arif Lukito 2006-04-17 20:03:10 UTC
(In reply to comment #5)
> That's good to know. Will it also set the same permissions for
> /var/lib/cache/beagle, even though the command is "keepdir
> /var/lib/cache/beagle/indexes" ? We also need /var/lib/cache/beagle to be owned
> by beagleindex because mono will create its .wapi directory there. I saw a
> commit just recently that beagle-crawl creates a temp dir for mono for
> crawling, but I don't think there's a need to wait for that.
> 

yes it will also set the same permission to a new created parent dir
Comment 8 Arif Lukito 2006-04-17 20:23:57 UTC
(In reply to comment #5)
> I saw a
> commit just recently that beagle-crawl creates a temp dir for mono for
> crawling, but I don't think there's a need to wait for that.
ah so there's no need to give beagleindex a home dir
just remember that for next beagle version
Comment 9 Luis Medinas (RETIRED) gentoo-dev 2006-04-22 16:16:42 UTC
*** Bug 130370 has been marked as a duplicate of this bug. ***
Comment 10 Luis Medinas (RETIRED) gentoo-dev 2006-04-22 16:45:29 UTC
the permission issue is fixed in cvs. About the user imo use nologin is the right way but looks like it's broken.
Comment 11 Pat Double 2006-04-22 17:54:50 UTC
Version 0.2.5 fixes this. Almost, the arguments to su are slightly wrong, but this is already fixed in CVS for tools/beagle-crawl-system.in.
Comment 12 Arif Lukito 2006-04-22 21:32:20 UTC
I attached the fix on bug 130711 but doesn't seem to make its way to the tree
Comment 13 Luis Medinas (RETIRED) gentoo-dev 2006-04-29 11:14:32 UTC
bumped to 0.2.6 and all issues are now fixed.
Thanks everyone.