Which is the best method to create Daemon on Ubuntu? (As a root user Or as a specific user))

Asked by Sushil

I want to create Daemon on Ubuntu.

But I am confuse about what will be the best access level.
i.e should I install daemon as root user or specific user.

As I am new to this technology I want to know that,
In general Which method does Developer's prefer?

If any one having any idea regarding this please reply to this post ASAP.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu commons-daemon Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Andriopoulos Nikolaos (sirnicolas21) said :
#1

daemons are specific on what they do.... "pulse audio" for example its per user so each user listens its own sounds.... if you root it they will be mixed all together or probably expode (crash)

u must tell us what u need to do....

and btw.... im not a developer (here anyway) this section is created for experienced or not members to help its other.

Revision history for this message
Sushil (sushil-vichare511) said :
#2

Hello Andriopoulos Nikolaos,

        Thanks for u r response....!

I am having service on windows(written in Java) which monitors my
UI also this service in background checking updates for my software.
If new updates are available then it will automatically(without informing the user) install
that updates.

I want to do same thing on Linux(Ubuntu).
for that purpose I want create Daemon.
But I confused that should I create Daemon as Root User or as Specific User.

I read some where that in Linux to install software root privilege is required.

Also my requirement is that once I install the software then it will available to All user(On same machine).

In such scenario What is the best solution?

Revision history for this message
Andriopoulos Nikolaos (sirnicolas21) said :
#3

i dont know what u need to monitor in your user interface (UI) but monitoring something from user A to user B it needs root privs, also the upgrade is impossible without root privs so u should root your daemon also for this.... however u can set the "software sources" program to check once per day for updates and install them automatically, it has an option for security updates, rest of the packages if installed without user approval will cause problems... simple example is firefox which drops a message that it needs restart, its not harmfull but u might discover harmfull updates if u automate the non-security ones.

Can you help with this problem?

Provide an answer of your own, or ask Sushil for more information if necessary.

To post a message you must log in.