Christian Weiske <cweiske@cweiske.de> writes:
> Hello David,
>
>
>>> I setup notmuch in my user account "cweiske" and now want to use the
>>> browser-based "notmore" UI for it.
>>> I setup notmore on Apache + PHP, and it runs as www-data user.
>>>
>>> The directory permissions should be fine; I changed via "su -s
>>> /bin/bash
>>> - www-data" to the user and executed "notmuch --config
>>> /home/cweiske/... search test" and it returned results.
>>>
>>> When "notmuch search" is run via apache's mod_php, it exits with
>>> status code 1, and no output in stdout nor stderr.
>>>
>>> What could the reason be for that?
>>>
>>> ----
>>>
>>> Running "notmuch config list" via apache works.
>>> There are no selinux/apparmor errors in jourctl or dmesg.
>>>
>>> "strace -f" output it not really helpful, but is attached.
>>
>>One thing you can try is setting NOTMUCH_DEBUG_QUERY to some nonempty
>>value. That should generate some output if it gets as far as parsing
>>the query.
>
>
> I finally had time to debug this and compared "strace" output when
> running it locally vs. inside Apache as www-data.
>
> The difference began when notmuch tried to access the following folders:
> - /home/cweiske/.config/notmuch/default/hooks
> - /home/cweiske/.local/share/notmuch/default/backups
> It did not try that under Apache.
>
> Then I set the two XDG environment variables and it started to work:
> XDG_CONFIG_HOME=/home/cweiske/.config XDG_DATA_HOME=/home/cweiske/tmp
>
> Should notmuch require them?
You could try setting
database.hook_dir
database.backup_dir
instead of the environment variables.
Notmuch should work in the case that neither XDG_CONFIG_HOME or
XDG_DATA_HOME are set. There could be something triggered by running
within a (presumably) clean environment. You could try "su -l -s
/bin/bash www-data" and try your notmuch tests again.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org