• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Crontab v. Applescript & Command Line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crontab v. Applescript & Command Line


  • Subject: Re: Crontab v. Applescript & Command Line
  • From: John W Baxter <email@hidden>
  • Date: Thu, 15 Nov 2001 12:26:53 -0800

At 10:38 -0800 11/15/2001, Christopher Nebel wrote:
>> Could a task started by cron use the su command to change its ownership
>> from root to some other user or start a process that would be owned by
>> some other user? If this works, it would amount to a 5th option for
>> Gary, wouldn't it?
>
>I don't think so, but it might be worth trying anyway. su (and the
>underlying setuid function) change the user id of the process, but I
>doubt that affects the process group. I'm not enough of a Unix geek to
>know for sure.

Processes started in an individual user's crontab are run as that user
(which makes them rather safer than those run out of the system crontab,
which is /etc/crontab).

Processes started in the system crontab are run as the user specified in
the line for that task...it is so often "root" in /etc/crontab that people
tend to think that the word root is some sort of required syntax.

I doubt that the process group is affected by either of these. Can I
successfully execute setsid as part of a root (or, worse, nonroot) cron
task, thereby creating a new process group? I've never had to find out,
but I'm doubtful.

See
man crontab
for the means of creating a user crontab (the program which does so is
called crontab...unfortunately so is the file). And if you experimented,
be prepared to be tossed into the vi editor, although there is a way to
create a text file and hand that to the crontab program.

See
man 5 crontab
for a description of a crontab file (the format differs slightly between a
user and a system crontab).

--John


References: 
 >Re: Crontab v. Applescript & Command Line (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: how to get os version?
  • Next by Date: Re: Script Menu and "front" property
  • Previous by thread: Re: Crontab v. Applescript & Command Line
  • Next by thread: Delete Bytes from the Start of the Data Fork
  • Index(es):
    • Date
    • Thread