EasyCwmp - easycwmp
View Issue Details
0000038easycwmp[All Projects] Helppublic2015-02-24 11:522015-02-26 10:24
resolvedno change required 
Debian Jessie
0000038: Can't run easycwmpd as non-root user
Is it possible to run easycwmpd (the daemon) as a non-root user?
I would like to do this for obvious security reasons.

I've tried getting ubusd running as the same non-root user (works fine), giving full permissions on the entire /opt/dev/easycwmp folder, adding execute rights for scripts in the dependencies, giving write access to /var/log/syslog etc etc, but easycwmpd resolutely refuses to run unless root user.
Nothing is written to any log file as far as I can see, so it's hard to diagnose further.

(easycwmp the script works fine - it's just the daemon that won't run).
as above
No tags attached.
Issue History
2015-02-24 11:52tomdjpnNew Issue
2015-02-25 05:39tomdjpnNote Added: 0000128
2015-02-25 10:42mohamed.kallelNote Added: 0000130
2015-02-25 16:38mohamed.kallelCategoryBug => Help
2015-02-25 16:43mohamed.kallelPriorityhigh => normal
2015-02-25 16:43mohamed.kallelSeveritymajor => minor
2015-02-26 10:24mohamed.kallelStatusnew => resolved
2015-02-26 10:24mohamed.kallelResolutionopen => no change required
2015-02-26 10:24mohamed.kallelAssigned To => mohamed.kallel

2015-02-25 05:39   
Looking at the source, I note main() does a check of the UID and fails if not 0 (root). This is understandable because daemon needs capabilities e.g. to open socket.
Could it be imagined to do something similar to apache/nginx where the master process runs as root but the workers are non-root?
2015-02-25 10:42   
You can run as non root only if you have permission on your non-root user to use sockets.
And also you need permissions to create file under /var/run