startup script won't start manually by non-privileged user (FreeBSD11)

for example, rc.d-script from net-p2p/transmission-daemon.
For some reasons, i don't need start it at boot.
In rc.conf set:
Code:
transmission_user="plague"
In freebsd 8.4
$ /usr/local/etc/rc.d/transmission onestart
works fine.
In 11 I got error:
Code:
limits: setrlimit datasize: Operation not permitted
It's because it tries to set limits (line 1075 in rc.subr 299349), that's not allowed for non-privileged users.
Code:
# Prepend default limits
_doit="limits -C $_login_class $_doit"
How I can disable this in that script?
 
Thanks, Cap, but I asked for answer how I can resolve it. Or we are talk not about UNIX-system?
 
That should work since running services on an unprivileged user is part of the rc(8) framework. I'd consider that a bug that needs fixing.
 
That's not the same, you still need to run the script as root and then the startup script will use the ${name}_user to launch the binary.
 
I'd consider that a bug that needs fixing.
i think the same.
If there is an option to run that service as an unprivileged user, there must be the key to force not to set daemon limits and leave it on that user group level privileges.
 
khm... Directly for transmission, as user-level application, daemon level limits strongly not necessary, and furthermore, harmful.
imho.
 
line 1075 in rc.subr 299349
Code:
 # Prepend default limits
_doit="limits -C $_login_class $_doit"
changed to
Code:
if [ `whoami` != "root" ] && [ ${name} == transmission ]; then
  _doit="$_doit"
  else
  # Prepend default limits
  _doit="limits -C $_login_class $_doit"
fi
 
Back
Top