public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: Beolach <beolach@gmail.com>
To: Karthik <karthikv@alum.dartmouth.org>
Cc: linux-newbie@vger.kernel.org
Subject: Re: cron job for rsync
Date: Fri, 30 Jul 2004 01:29:47 -0600	[thread overview]
Message-ID: <aebf5d9704073000295854799d@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0407300240000.20622-100000@legolas.personal.engin.umich.edu>

There's a couple of different versions of cron available,  and you don't specify
which one you use, so I'll just answer with what I'm most familiar with.

Dillon's cron (the cron used in Slackware - crond) says this in it's man page:
"Whenever crond must run a job, it first creates a daemon-owned temporary
file O_EXCL and O_APPEND to store any output, then fork()s and changes
its user and group permissions to match that of the user the job is being run
for, then exec's /bin/sh -c to run the job."  So if you have crond, just run
'crontab -e [user]' to create [user]'s crontab, and it will be run with [user]'s
uid & gid.

In my quick skim of vixie cron's man pages (vixie cron is another common
cron) I didn't see anything one way or another about what uid it runs as, and
I've never used it myself, so if you use vixie cron I don't know what
uid the job
will run as. But I do know it does have a crontab for each user, so I would
guess it would run as the user who owns the crontab.

HTH,
Conway S. Smith

On Fri, 30 Jul 2004 02:48:12 -0400 (EDT), Karthik Vishwanath
<karthik.vishwanath.adv03@alum.dartmouth.org> wrote:
> Hello,
> 
> I was considering adding an entry in crontab for automated synchronization
> of files across two machines that I work on most frequently. One machine
> is at work, while the other at home. I used ssh-keygen so that I am
> able to be auto-authenicated to the machine at work from home. I want to
> run a cron job that runs at home to update the a list of files (from
> home->work if the most recent file is the one at home, or vice-versa.)
> 
> I was particularly concerned about whether rysnc/rcp would be able use the
> authorized-key values from my $HOME (which is non-root) to be able to
> login to the remote machine. Do cron jobs run as root or can they be run
> for particular users as well?
> 
> All ideas/inputs are appreciated.
> 
> Thanks,
> 
> -K
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

      reply	other threads:[~2004-07-30  7:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-30  6:48 cron job for rsync Karthik Vishwanath
2004-07-30  7:29 ` Beolach [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aebf5d9704073000295854799d@mail.gmail.com \
    --to=beolach@gmail.com \
    --cc=karthikv@alum.dartmouth.org \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox