Can't start Freeradius with non-root user

Jeanderson Soares ssjeanderson at gmail.com
Wed Jun 29 19:33:18 CEST 2016


Hello, everyone

I'm having a problem when running freeradius with a non-root user/group.
The service can't start because of permissions on log and pid files.
When started in debug mode, the service starts and works fine, but fails in
production:

# radiusd
radiusd: Failed to open log file /usr/local/var/log/radius/radius.log:
Permission denied

Changed the folder owner, but still got same error
# chown -R radius:radius /usr/local/var/log/radius/

# radiusd
radiusd: Failed to open log file /usr/local/var/log/radius/radius.log:
Permission denied

If I specify the file, freeradius can create log file but shows nothing on
output
# radiusd -l /usr/local/var/log/radius/radius.log
#

Cheking de log file, happens the same with the pid file:
Error: Failed creating PID file /usr/local/var/run/radiusd/radiusd.pid:
Permission denied

Again, changed the folder owner, but still got same error
# chown -R radius:radius /usr/local/var/run/radiusd/

Running with commented user and group options, the service works fine.

I'm on Debian 8.0.3 and Freeradius 3.0.11

Freeradius was compiled with default options.

The user was created with:
useradd -r -d /usr/local/etc/raddb/ -s /bin/false radius

Thanks for any help.


More information about the Freeradius-Users mailing list