Bug#657103: rkhunter: Invalid BINDIR configuration option: Invalid directory found: ~/bin

Jesse Molina jesse at opendreams.net
Wed Feb 1 00:29:47 UTC 2012


Okay, I understand now.  Thanks for your help.

I have a habit of quoting things.  Looks like it bit me.

~/bin does get expanded for me in the shell, so it's never been a 
problem for me before.  Since rkhunter takes $PATH in as-is, it doesn't 
know what to do with ~.

FYI, this was never a problem until something in rkhunter changed fairly 
recently.

Thanks.  Go ahead and close out.




Julien Valroff wrote:
> Le mardi 31 janv. 2012 à 09:02:59 (+0100 CET), Jesse Molina a écrit :
>>
>> Sorry for slow reply.
>>
>> -->echo $PATH
>> ~/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
>>
>> -->egrep PATH= .bash*
>> .bash_profile:PATH="/usr/local/sbin:/usr/sbin:/sbin:${PATH}"
>> .bash_profile:    PATH="~/bin:${PATH}"
>
> OK, I have finally managed to get this behaviour, "~/bin" is not expanded...
>
> [...]
>> The question as to why BINDIR in the config file is being ignored remains.
>
> Read around line 2122 of rkhunter:
>
> 	# The BINPATHS list is prepended with the root PATH. However,
> 	# any specified BINDIR directories beginning with a '+' will
> 	# be prepended before the root PATH.
> 	#
> 	# Once that has been done, we check that each directory begins
> 	# with a '/'. We remove any non-existent directories, but we do
> 	# not flag this as an error. We also remove any duplicate directories.
>
> Hence the root PATH is then always considered, contrary to what I had
> originally thought. The behaviour you describe is IMHO normal, the cause is
> the fact you don't allow ~/bin to be expanded to /home/user/bin.
>
> Simply change your .bash_profile to state PATH=~/bin:${PATH} and it should
> work as expected.
>
> Cheers,
> Julien
>

-- 
# Jesse Molina
# Mail = jesse at opendreams.net
# Page = page-jesse at opendreams.net
# Cell = 1.602.323.7608
# Web  = http://www.opendreams.net/jesse/







More information about the forensics-devel mailing list