Running Cyrus Imap under a different user

Simon Matter simon.matter at
Thu Nov 4 02:11:08 EDT 2010

> Thanx, I understand what you mean, but I'm also supposed to stop and start
> the same deamon
> from this user again, manually, without su.
> I already solved the sudo problem, by wrapping the master launch inside a
> shell that will
> set the environment for it, and infact it does.
> What happens is later, when master forks and change user.
> Why is it again loosing my environment?

That's really interesting because in my tests it seems to have worked.
Could you show us "strings /proc/<PID of master>/environ" and "strings
/proc/<PID of imapd>/environ"?
BTW, are you running Linux or another *X?


> I just want the binaries to override system libs with mine :)
> (of course I could set system environemnt inside master profile or
> elsewhere, but this is not what I want to do. I can't touch any root
> system behaviour)
> Thanx again :)
> Gabriele.
> -= Mail sent through WebTop2 =-
> ----------------------------------------------------------------------------------
> Da: Clement Hermann (nodens)
> A: info-cyrus at
> Data: 3 novembre 2010 20.59.53 CET
> Oggetto: Re: Running Cyrus Imap under a different user
> Le 03/11/2010 18:03, Gabriele Bulfon a écrit :
> Thanx for the quick reply ;)
> Yes, environment is correctly exported.
> Maybe there is something I can tell to Linux so that it gives my
> environement to anyone
> changing user to myuser?
> You are not supposed to use sudo to do this. The correct way is to login
> as root (or change identity via su -, or let init run the init script
> for you at startup), and launch the init script to start cyrus master,
> which will drop privileges when forking to child processes (imapd,
> pop3d, etc).
> sudo *will* remove some environment variables, as a security mesure.
> It could be that the best way to achieve what you want is to modify an
> existing binary package of cyrus imapd for your distribution, modifiying
> only the user-related configure options and configuration scripts.
> Cheers,
> --
> Clement Hermann (nodens)
> - "L'air pur ? c'est pas en RL, ça ? c'est pas hors charte ?"
> Jean in L'Histoire des Pingouins,
> Vous trouverez ma clef publique sur le serveur public
> Please find my public key on the public keyserver
> ----
> Cyrus Home Page:
> List Archives/Info:
> ----
> Cyrus Home Page:
> List Archives/Info:

More information about the Info-cyrus mailing list