Gentoo Archives: gentoo-user

From: karl@××××××××.se
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Encfs and mlocate
Date: Mon, 02 Dec 2019 22:34:18
Message-Id: 20191202223409.E608F80428C2@turkos.aspodata.se
In Reply to: [gentoo-user] Encfs and mlocate by tuxic@posteo.de
1 mcc:
2 > I want to index the contents of a ecryptfs-ed directory tree with
3 > mlocate storing the resulting db in that directory tree
4
5 I do like this:
6
7 Nightly run:
8 PRUNEPATHS=$HOME/tmp
9 updatedb -l 0 -U $HOME -o $HOME/.updatedb
10 chmod 600 $HOME/.updatedb
11
12 To find:
13 locate -d $HOME/.updatedb "$@"
14
15 Works without problem here.
16
17 ...
18 > Reading its contents with
19 >
20 > locate -d var/lib/mlocate/mlocate.db whattofind
21 >
22 > results in
23 >
24 > locate: can not stat () `var/lib/mlocate/mlocate.db': Permission denied
25 >
26 > the file shows this permission:
27 >
28 > -rw-r--r-- 1 me users 1319628 2019-12-02 04:25 var/lib/mlocate/mlocate.db
29 >
30 > . Why can I create a file, which afterwards I am not allowed to read?
31
32 Even if you cannot read a file you should be able to stat it,
33 like e.g. stat /etc/shadow.
34
35 It can be some problem with directory permissions, try to cd to your
36 var/lib/mlocate directory and then do a locate -d mlocate.db ...
37
38 Can you read your db file with something else, e.g. md5sum,
39 to verify that you can read it in some ways.
40
41 Regards,
42 /Karl Hammar

Replies

Subject Author
Re: [gentoo-user] Encfs and mlocate tuxic@××××××.de