Re: Systemd unit file executed as non-root user, WAS: Systemd unit file: Can/Should ExecStart and ExecStop run a script?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 17, 2011 at 3:56 PM, Richard Shaw <hobbes1069@xxxxxxxxx> wrote:
> On Thu, Nov 17, 2011 at 3:41 PM, Jeffrey Ollie <jeff@xxxxxxxxxx> wrote:
>> On Thu, Nov 17, 2011 at 3:34 PM, Richard Shaw <hobbes1069@xxxxxxxxx> wrote:
>>> Ok, reviving this conversation!
>>>
>>> I ran into the issue that user "mythtv" can not create the file
>>> "/var/run/mythbackend.pid". I see other services that have their pid
>>> file owned by their own user...
>>
>> systemd doesn't really need a PID file to manage the service, can
>> mythtv be told not to create it?  If it insists on creating it see if
>> you can move it to a subdirectory of /run (like /run/mythtv) that is
>> owned by mythtv.
>
> Well PIDFile is recommended when using type forking. One option would
> be to drop the "--daemon" option and move to type "simple".

I tried this and it appears to work.


>>> Also, user "mythtv" can't write to the log file in /var/log/mythtv/
>>
>> Change the ownership of /var/log/mythtv.

I added "install -d -o mythtv -g mythtv /var/log/mythtv" to %post for
the backend package. Is there a better way to do this?

Thanks,
Richard
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux