OpenRC / openrc

The OpenRC init system
BSD 2-Clause "Simplified" License
1.47k stars 246 forks source link

`rc_ulimit="-l 65535"` has no effect when `command_user` is set #759

Closed alopatindev closed 1 week ago

alopatindev commented 1 week ago

Is that expected behavior? I reproduced it on Alpine Linux 3.20.3 with openrc-0.54-r1 (it's built with -Dpam=false there).

Is there any way to set ulimit for specific daemon (that uses io_uring, which becomes popular) that runs as non-root user (besides first running it as root and then do something like setuid in the process itself, like it's done in mpd)?

I find that scary that currently developers seem to be required (?) to design their deamons the way they need to be first run as root, just to make something like ulimit work. User trusts init system more than some experimental daemon, so it would be nice if init system could set the required limit without running the daemon as root.

alopatindev commented 1 week ago

I was mistaken: it seems that limit is correctly set. For some reason I needed a higher limit then it was documented for this program.