[ale] cron jobs [solved]

Wolf Halton wolf.halton at gmail.com
Mon Aug 8 15:36:38 EDT 2011


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't have a /home folder.  I
must have been a little tired, using -r instead of -l to display the user's
crontab file. :-)

-Wolf

On Mon, Aug 8, 2011 at 8:24 AM, Lightner, Jeff <JLightner at water.com> wrote:

> You can do it that way but since each user can have its own crontab there's
> no requirement to do it that way.   Running it in the user's crontab avoids
> the need to run "su - <user>" in the script along with possible attendant
> ugly output for trying to setup a terminal based session that doesn't apply
> in background processes.   (Not a problem - just makes logging look bad.)
>
>
>
>
>
> -----Original Message-----
> From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Jim
> Lynch
> Sent: Sunday, August 07, 2011 4:26 AM
> To: Atlanta Linux Enthusiasts
> Subject: Re: [ale] cron jobs
>
> On 08/05/2011 03:22 PM, Lightner, Jeff wrote:
> >
> > Does the user exist in /etc/passwd?  (or NIS or LDAP?)   crontab -e is
> > for editing system users.   The message you got suggests the otrs
> > "home directory" is /opt/otrs.
> >
> > When you ran crontab -e did you run it as the otrs users or as root?
> > (If any other user it would likely fail due to permissions as you saw.)
> >
> > ------------------------------------------------------------------------
> >
> > *From:*ale-bounces at ale.org [mailto:ale-bounces at ale.org] *On Behalf Of
> > *Wolf Halton
> > *Sent:* Friday, August 05, 2011 2:52 PM
> > *To:* Atlanta Linux Enthusiasts
> > *Subject:* [ale] cron jobs
> >
> > I want to do a cron job for otrs user, to check for mail hourly from
> > my mail server
> > otrs at localhost doesn't have a 'real' home folder, and
> > crontab -e saves the file to /tmp
> > when I look for my cron job
> > crontab -r -u otrs
> > it tells me -->
> >
> > cannot touch '/opt/otrs//.selected_editor': Permission Denied
> >
> If you need to run a cron as a user, consider putting the command in
> /etc/crontab.  There you can specify the user the command is run as.
>
> Jim.
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>
>
> Proud partner. Susan G. Komen for the Cure.
>
>
> Please consider our environment before printing this e-mail or attachments.
>
> ----------------------------------
> 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.
> ----------------------------------
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



-- 
This Apt Has Super Cow Powers - http://sourcefreedom.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20110808/3aadcd71/attachment.html 


More information about the Ale mailing list