karl:
Doesn't work here. Your $HOME is encryoted (see my initial mail)?

I can stat/md5sum the database file. But even a locate right 
in the directory containing the database file fails with

# lib/mlocate>l
total 1092
-rw------- 1 "uid"  users 1115645 2019-12-03 20:12 mlocate.db
solfire:lib/mlocate>locate -d mlocate.db test
locate: can not stat () `mlocate.db': Permission denied
[1]    19339 exit 1     locate -d mlocate.db test

Regards,
Meino 

On 12/02 11:34, [email protected] wrote:
> mcc:
> > I want to index the contents of a ecryptfs-ed directory tree with
> > mlocate storing the resulting db in that directory tree
> 
> I do like this:
> 
>   Nightly run:
> PRUNEPATHS=$HOME/tmp
> updatedb -l 0 -U $HOME -o $HOME/.updatedb
> chmod 600 $HOME/.updatedb
> 
>   To find:
> locate -d $HOME/.updatedb "$@"
> 
> Works without problem here.
> 
> ...
> > Reading its contents with
> > 
> > locate -d var/lib/mlocate/mlocate.db whattofind
> > 
> > results in 
> > 
> > locate: can not stat () `var/lib/mlocate/mlocate.db': Permission denied
> > 
> > the file shows this permission:
> > 
> > -rw-r--r-- 1 me users 1319628 2019-12-02 04:25 var/lib/mlocate/mlocate.db
> > 
> > . Why can I create a file, which afterwards I am not allowed to read?
> 
> Even if you cannot read a file you should be able to stat it,
> like e.g. stat /etc/shadow.
> 
> It can be some problem with directory permissions, try to cd to your 
> var/lib/mlocate directory and then do a locate -d mlocate.db ...
> 
> Can you read your db file with something else, e.g. md5sum,
> to verify that you can read it in some ways.
> 
> Regards,
> /Karl Hammar
> 
> 
> 

Reply via email to