Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#40094 - [subversion] svnserve.service fails as non-root user

Attached to Project: Arch Linux
Opened by Johan Rosenqvist (Naxinz) - Friday, 25 April 2014, 21:08 GMT
Last edited by Felix Yan (felixonmars) - Thursday, 29 May 2014, 02:43 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Angel Velasquez (angvp)
Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Running an svnserve daemon as a service as a non-root user as described on the wiki does not work. The child process fails immediately without any clear error message in the journal.

Modifying svnserve.service removing the --pidfile argument from the command line solves the issue. Adjusting the permissons on /run/svnserve to allow the non-root user to create the pid file also solves the issue. Running with the official, unchanged unit (as root) works fine.

Additional info:
* package version(s): subversion 1.8.8-1, systemd 212-3
* viewed on 2014-04-25

Steps to reproduce:
- Install the subversion package.
- Create a drop-in for svnserve.service setting User to an existing non-root user.
- Start svnserve.service. There is no error message at this point.
- Viewing the service status shows the error message 'svnserve.service: main process exited, code=exited, status=1/FAILURE'.
This task depends upon

Closed by  Felix Yan (felixonmars)
Thursday, 29 May 2014, 02:43 GMT
Reason for closing:  Implemented
Additional comments about closing:  --pidfile removed in 1.8.9-2
Comment by Felix Yan (felixonmars) - Thursday, 15 May 2014, 06:06 GMT
How about putting an svnserve.conf under /etc/tmpfiles.d, with the desired user? Like:

D /run/svnserve 0700 the_user the_user -
Comment by Johan Rosenqvist (Naxinz) - Friday, 16 May 2014, 18:49 GMT
Yes, that's certainly a solution, but I don't think its the best. Every user wanting to not run as root would have to 1) know the file is needed (= update the wiki) and 2) actually create it, effectively doubling the amount of work needed (writing two config files instead of one).

As far as I can see, the pid file is never read by anything. There is no PIDFile=/run/svnserve/ line in svnserve.service, so systemd doesn't use it, and it still figures out the correct child pid. This is currently the case in my own setup, using a custom unit with --pidfile removed.

I doubt that some other program is reading it (please correct me if I'm wrong here), so if it's not needed and causing trouble, why keep it?