Re: [Burp-users] pid file when server is run as user under Ubuntu
Brought to you by:
grke
|
From: Frans <fp...@xs...> - 2017-03-15 17:30:38
|
I use RedHat but since Ubuntu 16 also uses systemd I guess the solution to this would be the same, modify/create a systemd service file for burp that handles it. You specify a slightly different path to the pid file in burp-server.conf and then via RuntimeDirectory ask systemd to create the subdirectory when the service is started, it will also remove that directory with contents on service stop. See example below; $ grep pid /etc/burp/burp-server.conf pidfile = /var/run/burp/server.pid $ cat /etc/systemd/system/burp.service [Unit] After=network.target Description=burp server [Service] ExecStart=/usr/sbin/burp -F -c /etc/burp/burp-server.conf User=burp Group=burp RuntimeDirectory=burp # Hardening UMask=0077 PrivateTmp=yes PrivateDevices=yes InaccessibleDirectories=/boot ProtectSystem=true ProtectHome=yes #NoNewPrivileges=yes ## do not do this, postdrop/mail fails then #end > -----Oorspronkelijk bericht----- > Van: Marat Khalili [mailto:mk...@rq...] > Verzonden: ma 6 maart 2017 15:29 > Aan: bur...@li... > Onderwerp: [Burp-users] pid file when server is run as user under Ubuntu > > This is more an answer than a question, but I'd of course appreciate > feedback. > > I installed burp-server from the great ziirish repository on Ubuntu > 16.04 and changed user and group parameters in burp-server.conf to > non-root user "burp". Then it failed to start due to not having enough > access rights to create /var/run/burp-server.pid . Providing necessary > access rights is easy but only works until next reboot, since in Ubuntu > /var/run is symlinked to /run which is located on tmpfs. Changing > pidfile location to different place like user's home directory is > possible but ugly. > > Turns out there's now a canonical way to create temporary files with > necessary access rights in Ubuntu. Just put following contents to > /etc/tmpfiles.d/burp-server.conf: > > > #Type Path Mode UID GID Age Argument > > f /var/run/burp-server.pid - burp burp - - > Then it will be created automagically on reboot belonging to burp. > > Hope this helps someone, possibly even package author :) > > > -- > > With Best Regards, > Marat Khalili > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Burp-users mailing list > Bur...@li... > https://lists.sourceforge.net/lists/listinfo/burp-users |