Cron

Bryce C plug-discuss@lists.plug.phoenix.az.us
20 Dec 2002 14:21:09 -0700


--=-oQEuhGO7y6ktPlsVetUp
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Probably root.  Look at your /etc/crontab and there should be about 5
lines with run-parts.  Here's mine:

# run-parts
01 * * * * root nice -n 19 run-parts /etc/cron.hourly
02 4 * * * root nice -n 19 run-parts /etc/cron.daily
22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly
42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly

And you can see that run-parts is run as root.  You can make scripts run
as a different user simply by putting the command in 'su USER -c
"COMMAND" '.



On Fri, 2002-12-20 at 14:08, Jim wrote:
> I decided that one way to back up a database is to write a bash script to=
 run=20
> mysqldump.  I know that I can put the script in /etc/cron.weekly and have=
 it=20
> execute every week.  My question is what user will the cron job run as?
--=20
Bryce C <Plug@BryceCo.Net>
CoBryce Communications

--=-oQEuhGO7y6ktPlsVetUp
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA+A4nF/wbq/C6yyPcRAoIfAJ4wVGpxAdIzulk1O7fAmAf7Qq3V5ACgk+20
J9FLqRh+ZmzvNg6lUad2XwM=
=0SHe
-----END PGP SIGNATURE-----

--=-oQEuhGO7y6ktPlsVetUp--