On Mon, Sep 03, 2018 at 06:44:32AM -0700, Ali Kakakhel wrote:
> In the service file, I set the ExecStart value as follows.
> 
> ExecStart=/usr/local/bin/fava --host localhost --port 5000 --prefix /fava /
> home/alice/beancount/main.beancount
> 
> That last item is the path to the main.beancount file. Does fava act as a 
> user that does not have permission to read the file in that location?

By default systemd services are run as root (see systemd.exec(5)). So it
should work, but it is probably not a great idea for running Fava. What
I personally do is tell systemd to run fava as my own user. My main
Beancount file is readable/writable by that user. FWIW, here's my
service file:

------------------
$ cat /etc/systemd/system/fava.service 
[Unit]
Description=Fava Web UI for Beancount, running on Zack's ledger

[Service]
Type=simple
ExecStart=/usr/local/bin/fava --prefix /beancount /path/to/main.beancount
User=zack
------------------

Hope this helps,
Cheers
-- 
Stefano Zacchiroli . z...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader & OSI Board Director  . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/20180903135823.GA17301%40upsilon.cc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to