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
In Reply to: [gentoo-user] Encfs and mlocate by
> 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


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