Web Hosting Talk







View Full Version : to be (root) or not to be (root)


realalien
10-30-2002, 01:33 PM
hello :)

I'm wondering which user you use for your cronjobs. f.eg. do you have ROOT launching the cronjobs for webstats, backups ecc? or do you create a new user with root priviliges?

thanks indeed for your help!

Mdot
10-30-2002, 03:08 PM
It is better to avoid running anything from root (or user with root privileges), just run from normal user, if something require root then run as run.

Miha.

realalien
10-30-2002, 03:31 PM
thanks miha,

this is what I was thinking to... but I'm always unsure to miss something.

is there a way to launch a backup script (dealing with data across the entire box) with a user without having root access? I don't think so... I'd be very happy if you could confirm this

Studio64
10-30-2002, 05:45 PM
Could you SU from your backup script?

Errr... Then you'd have the password hard coded into the script...

Good question.... Someone knows though :D

Mdot
10-30-2002, 06:04 PM
You can use root's crontab to backup the things, it is OK if you run them from root, but make sure you won't erase some important data during backup.

The other things like running stats, some services, is better to do from user without root's priv.

Miha.

realalien
10-31-2002, 03:41 AM
su in the script... hmmm I don't like the idea to have the pass hardcoded into a script...

miha.. I've tried but when running the stats with another user... well, the script wont work coz of missing priviliges (reading other users logfile, generating stats inside the user account).

is there a way to do this?

thanks again