I sorted out some of what I was doing wrong with crontab.  Since otrs is a true system user, like apache2 and ssh, it doesn&#39;t have a /home folder.  I must have been a little tired, using -r instead of -l to display the user&#39;s crontab file. :-)<br>
<br>-Wolf<br><br><div class="gmail_quote">On Mon, Aug 8, 2011 at 8:24 AM, Lightner, Jeff <span dir="ltr">&lt;<a href="mailto:JLightner@water.com">JLightner@water.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
You can do it that way but since each user can have its own crontab there&#39;s no requirement to do it that way.   Running it in the user&#39;s crontab avoids the need to run &quot;su - &lt;user&gt;&quot; in the script along with possible attendant ugly output for trying to setup a terminal based session that doesn&#39;t apply in background processes.   (Not a problem - just makes logging look bad.)<br>

<div class="im"><br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:ale-bounces@ale.org">ale-bounces@ale.org</a> [mailto:<a href="mailto:ale-bounces@ale.org">ale-bounces@ale.org</a>] On Behalf Of Jim Lynch<br>
Sent: Sunday, August 07, 2011 4:26 AM<br>
To: Atlanta Linux Enthusiasts<br>
</div><div><div></div><div class="h5">Subject: Re: [ale] cron jobs<br>
<br>
On 08/05/2011 03:22 PM, Lightner, Jeff wrote:<br>
&gt;<br>
&gt; Does the user exist in /etc/passwd?  (or NIS or LDAP?)   crontab -e is<br>
&gt; for editing system users.   The message you got suggests the otrs<br>
&gt; &quot;home directory&quot; is /opt/otrs.<br>
&gt;<br>
&gt; When you ran crontab -e did you run it as the otrs users or as root?<br>
&gt; (If any other user it would likely fail due to permissions as you saw.)<br>
&gt;<br>
&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; *From:*<a href="mailto:ale-bounces@ale.org">ale-bounces@ale.org</a> [mailto:<a href="mailto:ale-bounces@ale.org">ale-bounces@ale.org</a>] *On Behalf Of<br>
&gt; *Wolf Halton<br>
&gt; *Sent:* Friday, August 05, 2011 2:52 PM<br>
&gt; *To:* Atlanta Linux Enthusiasts<br>
&gt; *Subject:* [ale] cron jobs<br>
&gt;<br>
&gt; I want to do a cron job for otrs user, to check for mail hourly from<br>
&gt; my mail server<br>
&gt; otrs@localhost doesn&#39;t have a &#39;real&#39; home folder, and<br>
&gt; crontab -e saves the file to /tmp<br>
&gt; when I look for my cron job<br>
&gt; crontab -r -u otrs<br>
&gt; it tells me --&gt;<br>
&gt;<br>
&gt; cannot touch &#39;/opt/otrs//.selected_editor&#39;: Permission Denied<br>
&gt;<br>
If you need to run a cron as a user, consider putting the command in<br>
/etc/crontab.  There you can specify the user the command is run as.<br>
<br>
Jim.<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br>
<br>
<br>
</div></div><div class="im">Proud partner. Susan G. Komen for the Cure.<br>
<br>
<br>
Please consider our environment before printing this e-mail or attachments.<br>
<br>
----------------------------------<br>
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.<br>

----------------------------------<br>
<br>
</div><div><div></div><div class="h5">_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>This Apt Has Super Cow Powers - <a href="http://sourcefreedom.com">http://sourcefreedom.com</a><br>