Hi Mantas Mikulėnas, Got it, thanks a lot. On Wed, Feb 28, 2018 at 2:11 PM Mantas Mikulėnas <[email protected]> wrote:
> On Wed, Feb 28, 2018 at 3:30 AM, Firxiao zhang <[email protected]> > wrote: > >> Hi All. >> I am confusing the relationship between "systemd" and >> "/etc/security/limits.conf". >> so far, I am migrating a service(init.d) script(centos6) to systemd >> unit(centos7). >> on centos6, I defined the user limits in "/etc/security/limits.conf". and >> it worked well. >> after I done the same thing on centos7. I found the limits was not taking >> effect. so I googled this problem. it said I need define the limits in >> systemd unit file. like: LimitNOFILE=xxx. >> Here are my questions: >> 1. are the systemd limits and the system security limits individual? >> > > They are completely separate. /etc/security/limits.conf is *only* read by > PAM (pam_limits.so), which basically means user login sessions (getty, ssh, > xdm...) > > (Although it's possible for systemd to call PAM when starting a service, > it needs careful configuration and you shouldn't do it by default.) > > >> 2. if not. is there a way to make systemd read the system security limits >> as default? >> > > No. Limits for a service should be in its .service file. > > -- > Mantas Mikulėnas >
_______________________________________________ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/systemd-devel
