<div style="font-family: Verdana; font-size: 12px;">Thanx for the quick reply ;)<br><br>Yes, environment is correctly exported.<br>Maybe there is something I can tell to Linux so that it gives my environement to anyone<br>changing user to myuser? <br><div><br><font size="1"> -= Mail sent through WebTop2 =-</font>
</div><tt><br><br><br>----------------------------------------------------------------------------------<br><br>Da: Simon Matter <simon.matter@invoca.ch><br>A: Gabriele Bulfon <gbulfon@sonicle.com> <br>Cc: info-cyrus@lists.andrew.cmu.edu <br>Data: 3 novembre 2010 17.56.52 CET<br>Oggetto: Re: Running Cyrus Imap under a different user<br><br></tt><blockquote style="border-left: 2px solid rgb(0, 0, 128); margin-left: 5px; padding-left: 5px;"><tt>> Hello,<br>> I need to run cyrus as a different user, because for some reason I don't<br>> want to touch system users.<br>> I've built all the cyrus stuff under this different user, also using the<br>> configure switches<br>> (--with-cyrus-user=myuser --with-cyrus-group=mygroup).<br>> I followed the documentation to prepare all the needed directories by<br>> changing cyrus into myuser<br>> and mail into mygroup.<br>> I tried starting the master daemon as myuser, but it seems it has not<br>> enough privileges<br>> to listen on standard ports and some other problems.<br>> So I tried starting the master as root.<br><br>I think starting master as root is the correct way.<br><br>> To do this, the script (ran as myuser) do a sudo.<br>> The problem is that the new process will have a different environment than<br>> what my user has.<br>> Expecially, my environment has his own libs against which I compiled,<br>> different from the system ones.<br><br>So how exactly does you environment look? Is it LD_LIBRARY_PATH which<br>makes you cyrus use the correct libs?<br><br>> So, I prepared another script that prepares the environment and starts<br>> master.<br>> This way I could "sudo myscript".<br>> Master now runs, but then changes user to fork processes, and once again<br>> it seems to loose my environment:<br>> Nov 3 17:34:13 sl master[18963]: setrlimit: Unable to set file<br>> descriptors limit to -1: Operation not permitted<br>> Nov 3 17:34:13 sl master[18963]: retrying with 1024 (current max)<br>> Nov 3 17:34:13 sl master[18963]: process started<br>> Nov 3 17:34:13 sl master[18964]: about to exec /sonicle/bin/ctl_cyrusdb<br>> Nov 3 17:34:13 sl ctl_cyrusdb[18964]: incorrect version of Berkeley db:<br>> compiled against 4.8.30, linked against 4.3.29<br>> Nov 3 17:34:13 sl master[18963]: process 18964 exited, signaled to death<br>> by 11<br>> Nov 3 17:34:13 sl master[18963]: unable to setsocketopt(IP_TOS):<br>> Operation not supported<br>> Nov 3 17:34:13 sl master[18963]: ready for work<br>> Nov 3 17:34:13 sl master[18965]: about to exec /sonicle/bin/ctl_cyrusdb<br>> Nov 3 17:34:13 sl ctl_cyrusdb[18965]: incorrect version of Berkeley db:<br>> compiled against 4.8.30, linked against 4.3.29<br>> Nov 3 17:34:13 sl master[18963]: process 18965 exited, signaled to death<br>> by 11<br>> How can I solve this problem?<br>> Is there anyway to let the new processes have the correct environment?<br><br>Hm, I didn't check whether Cyrus resets the environment but, stupid<br>question, did you forget to export the vars in question?<br><br>Simon<br><br><br><br><br></tt></blockquote></div>