NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rc and login classes
On 07/06/17 16:00, Alexander Nasonov wrote:
Another issue on my server was trying to start a service (tor relay in
my case) with a low limit on open files in the default login class.
The relay starts as root but then it swiches to user "tor". I set the
login class of the tor user to "tor" which further extends a limit of
the daemon class. Both have big enough limit.
did you:
# cap_mkdb /etc/login.conf
My understaning is that the tor process doesn't move to the "tor"
login class when switching a user. As a result, I can't restart it
when I login as root. I have to set the login class with su -c like
this:
# su -c tor root /etc/rc.d/tor restart
I think that will just run the script /etc/rc.d/tor as class tor, not
actually start the daemon as class tor.
I'm not a su expert, but perhaps try the following and see what happens.
su -c tor root /path/to/tor
But somehow the relay starts fine at boot time. Is it because rc
is run with the daemon login class at boot?
Home |
Main Index |
Thread Index |
Old Index