1 |
karl: |
2 |
Doesn't work here. Your $HOME is encryoted (see my initial mail)? |
3 |
|
4 |
I can stat/md5sum the database file. But even a locate right |
5 |
in the directory containing the database file fails with |
6 |
|
7 |
# lib/mlocate>l |
8 |
total 1092 |
9 |
-rw------- 1 "uid" users 1115645 2019-12-03 20:12 mlocate.db |
10 |
solfire:lib/mlocate>locate -d mlocate.db test |
11 |
locate: can not stat () `mlocate.db': Permission denied |
12 |
[1] 19339 exit 1 locate -d mlocate.db test |
13 |
|
14 |
Regards, |
15 |
Meino |
16 |
|
17 |
On 12/02 11:34, karl@××××××××.se wrote: |
18 |
> mcc: |
19 |
> > I want to index the contents of a ecryptfs-ed directory tree with |
20 |
> > mlocate storing the resulting db in that directory tree |
21 |
> |
22 |
> I do like this: |
23 |
> |
24 |
> Nightly run: |
25 |
> PRUNEPATHS=$HOME/tmp |
26 |
> updatedb -l 0 -U $HOME -o $HOME/.updatedb |
27 |
> chmod 600 $HOME/.updatedb |
28 |
> |
29 |
> To find: |
30 |
> locate -d $HOME/.updatedb "$@" |
31 |
> |
32 |
> Works without problem here. |
33 |
> |
34 |
> ... |
35 |
> > Reading its contents with |
36 |
> > |
37 |
> > locate -d var/lib/mlocate/mlocate.db whattofind |
38 |
> > |
39 |
> > results in |
40 |
> > |
41 |
> > locate: can not stat () `var/lib/mlocate/mlocate.db': Permission denied |
42 |
> > |
43 |
> > the file shows this permission: |
44 |
> > |
45 |
> > -rw-r--r-- 1 me users 1319628 2019-12-02 04:25 var/lib/mlocate/mlocate.db |
46 |
> > |
47 |
> > . Why can I create a file, which afterwards I am not allowed to read? |
48 |
> |
49 |
> Even if you cannot read a file you should be able to stat it, |
50 |
> like e.g. stat /etc/shadow. |
51 |
> |
52 |
> It can be some problem with directory permissions, try to cd to your |
53 |
> var/lib/mlocate directory and then do a locate -d mlocate.db ... |
54 |
> |
55 |
> Can you read your db file with something else, e.g. md5sum, |
56 |
> to verify that you can read it in some ways. |
57 |
> |
58 |
> Regards, |
59 |
> /Karl Hammar |
60 |
> |
61 |
> |
62 |
> |