[Nix-dev] nixos service using privileged ports as a non-root user

Oliver Charles ollie at ocharles.org.uk
Fri Jun 5 00:37:09 CEST 2015


I believe the User option in systemd unit configuration should do this. See
the systemd.service man page - all options can be used in NixOS
On 4 Jun 2015 10:05 pm, "Ganesh Sittampalam" <ganesh at earth.li> wrote:

> Hi,
>
> I'm adding a service - darcsden - to NixOS that is designed to run as a
> non-root user, but should optionally be able to bind to a privileged
> port. It's not designed to start as root and then fork/drop privileges,
> so I'd like to handle this at the OS level somehow.
>
> I'm aware of various solutions:
>
>
> http://unix.stackexchange.com/questions/10735/linux-allowing-an-user-to-listen-to-a-port-below-1024
>
>
> http://stackoverflow.com/questions/413807/is-there-a-way-for-non-root-processes-to-bind-to-privileged-ports-1024-on-l
>
> Is there any standard/preferred way to do this in NixOS?
>
> Cheers,
>
> Ganesh
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150604/a15c972c/attachment.html 


More information about the nix-dev mailing list