Re: Question about writing systemd unit for old package

2021-05-21 Thread Richard Hector
On 20/05/21 1:59 pm, Alec Leamas wrote: Hi, On 20/05/2021 03:35, Paul Wise wrote: On Wed, May 19, 2021 at 8:51 AM Richard Hector wrote: Does that not depend on whether it does anything before dropping privileges? For example, a webserver can bind to low ports before dropping privilege. I imag

Re: Question about writing systemd unit for old package

2021-05-19 Thread Alec Leamas
Hi, On 20/05/2021 03:35, Paul Wise wrote: > On Wed, May 19, 2021 at 8:51 AM Richard Hector wrote: > >> Does that not depend on whether it does anything before dropping >> privileges? For example, a webserver can bind to low ports before >> dropping privilege. I imagine if the systemd service unit

Re: Question about writing systemd unit for old package

2021-05-19 Thread Paul Wise
On Wed, May 19, 2021 at 8:51 AM Richard Hector wrote: > Does that not depend on whether it does anything before dropping > privileges? For example, a webserver can bind to low ports before > dropping privilege. I imagine if the systemd service unit specified > running as (eg) www-data, that wouldn

Re: Question about writing systemd unit for old package

2021-05-19 Thread Richard Hector
On 18/05/21 11:58 am, Paul Wise wrote: On Mon, May 17, 2021 at 12:51 PM Khoa Tran Minh wrote: A related question: The binary itself can drop privilege and run as non-root, then should I use that native feature or use systemd User= when writing a default config/unit ? I would suggest to use

Re: Question about writing systemd unit for old package

2021-05-17 Thread Paul Wise
On Mon, May 17, 2021 at 12:51 PM Khoa Tran Minh wrote: > I'm trying to write a new systemd unit for mini-httpd package, which is > using lsb-base to init. Can I replace the old init script straight up, or > do I have to maintain both the systemd unit and the old init script ? Please make sure you

Question about writing systemd unit for old package

2021-05-17 Thread Khoa Tran Minh
Hi everyone, I'm trying to write a new systemd unit for mini-httpd package, which is using lsb-base to init. Can I replace the old init script straight up, or do I have to maintain both the systemd unit and the old init script ? A related question: The binary itself can drop privilege and run as