RE: [U2] Error code 2
I find this an interesting topic "running commands as root" , if anyone is interested I would like to move this to "community" and keep on talking about it (but only if others are interested, no fun talking to myself) :) Dougc _ Doug Chanco Engineer Developer Senior, TLOTLD Activant Solutions Inc.(tm) Austin, Texas 78746 T: 800-678-5426 F: 512-278-5915 E-mail: [EMAIL PROTECTED] Web site: www.activant.com _ > -Original Message- > From: [EMAIL PROTECTED] [mailto:owner-u2- > [EMAIL PROTECTED] On Behalf Of Jerry Banker > Sent: Friday, July 13, 2007 8:51 AM > To: u2-users@listserver.u2ug.org > Subject: RE: [U2] Error code 2 > > The 'o' option is not available on Red Hat Linux 3. Is there a problem > report that I can look at. And, yes any system administrator worth their > salt is not going to use commands in the cron that will potentially > cause the s..t to hit the fan. > > -Original Message- > From: John Jenkins [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 12, 2007 3:04 PM > To: u2-users@listserver.u2ug.org > Subject: RE: [U2] Error code 2 > > Jerry > > It relates to the UniVerse user number (which is now DERIVED from the > PID by > a means of information reduction to cater for long PIDs). There are a > maximum of 32K foreground processes and 32K PHANTOM processes. > > So you launch from crontab (a starting PID) and it generates a UV user > number and attempts to attach to shared memory at that point (as root). > The > answer is (of course) sir - certainly - right on - love you root. > > Whether you see a problem is moot - it depends, but it's not a good idea > (and root is not a good idea for other reasons as Doug mentioned). > > You MAY see a peripheral symptom of this: > > ipcs -mop|grep 0x > > Do you get these building up? Are they attached to the UV shared memory > segment? (compare "ipcs -mop" output for aceb, acec and ). > > I'll try and force it tomorrow time permitting, but the system I have is > not > heavily loaded and replication is not guaranteed. > > Regards > > JayJay > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Jerry Banker > Sent: 12 July 2007 13:37 > To: u2-users@listserver.u2ug.org > Subject: RE: [U2] Error code 2 > > John, > You've said this before. Could you elaborate a little more on this? We > run many tasks on cron as root and have never had any problems both with > Solaris and Linux. > Jerry > > -Original Message- > From: John Jenkins [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 11, 2007 6:19 PM > To: u2-users@listserver.u2ug.org > Subject: RE: [U2] Error code 2 > > Karl > > I can't see enough from your posting, but if you are running UniVerse > foreground processes from crontab as root then please don't > especially > AIX. > > Change to a non-root crontab > > Regards > > JayJay > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: 11 July 2007 15:07 > To: u2-users@listserver.u2ug.org > Subject: [U2] Error code 2 > > The following cron response came to me at 2:30pm in the day. We have > programs that run at various times, but this is the first time I've seen > this. What are the probable causes? TIA, Karl > > * BEGIN CRON EMAIL > > 1537 record(s) selected to SELECT list #0. > A fatal error has occurred in UniVerse. > Unable to re-open operating system file "" > Error code 2 > > > * > cron: The previous message is the standard output > and standard error of one of the cron commands. > > > END CRON EMAIL > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Error code 2
The 'o' option is not available on Red Hat Linux 3. Is there a problem report that I can look at. And, yes any system administrator worth their salt is not going to use commands in the cron that will potentially cause the s..t to hit the fan. -Original Message- From: John Jenkins [mailto:[EMAIL PROTECTED] Sent: Thursday, July 12, 2007 3:04 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Error code 2 Jerry It relates to the UniVerse user number (which is now DERIVED from the PID by a means of information reduction to cater for long PIDs). There are a maximum of 32K foreground processes and 32K PHANTOM processes. So you launch from crontab (a starting PID) and it generates a UV user number and attempts to attach to shared memory at that point (as root). The answer is (of course) sir - certainly - right on - love you root. Whether you see a problem is moot - it depends, but it's not a good idea (and root is not a good idea for other reasons as Doug mentioned). You MAY see a peripheral symptom of this: ipcs -mop|grep 0x Do you get these building up? Are they attached to the UV shared memory segment? (compare "ipcs -mop" output for aceb, acec and ). I'll try and force it tomorrow time permitting, but the system I have is not heavily loaded and replication is not guaranteed. Regards JayJay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jerry Banker Sent: 12 July 2007 13:37 To: u2-users@listserver.u2ug.org Subject: RE: [U2] Error code 2 John, You've said this before. Could you elaborate a little more on this? We run many tasks on cron as root and have never had any problems both with Solaris and Linux. Jerry -Original Message- From: John Jenkins [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 11, 2007 6:19 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Error code 2 Karl I can't see enough from your posting, but if you are running UniVerse foreground processes from crontab as root then please don't especially AIX. Change to a non-root crontab Regards JayJay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 11 July 2007 15:07 To: u2-users@listserver.u2ug.org Subject: [U2] Error code 2 The following cron response came to me at 2:30pm in the day. We have programs that run at various times, but this is the first time I've seen this. What are the probable causes? TIA, Karl * BEGIN CRON EMAIL 1537 record(s) selected to SELECT list #0. A fatal error has occurred in UniVerse. Unable to re-open operating system file "" Error code 2 * cron: The previous message is the standard output and standard error of one of the cron commands. END CRON EMAIL --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Error code 2
Jerry It relates to the UniVerse user number (which is now DERIVED from the PID by a means of information reduction to cater for long PIDs). There are a maximum of 32K foreground processes and 32K PHANTOM processes. So you launch from crontab (a starting PID) and it generates a UV user number and attempts to attach to shared memory at that point (as root). The answer is (of course) sir - certainly - right on - love you root. Whether you see a problem is moot - it depends, but it's not a good idea (and root is not a good idea for other reasons as Doug mentioned). You MAY see a peripheral symptom of this: ipcs -mop|grep 0x Do you get these building up? Are they attached to the UV shared memory segment? (compare "ipcs -mop" output for aceb, acec and ). I'll try and force it tomorrow time permitting, but the system I have is not heavily loaded and replication is not guaranteed. Regards JayJay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jerry Banker Sent: 12 July 2007 13:37 To: u2-users@listserver.u2ug.org Subject: RE: [U2] Error code 2 John, You've said this before. Could you elaborate a little more on this? We run many tasks on cron as root and have never had any problems both with Solaris and Linux. Jerry -Original Message- From: John Jenkins [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 11, 2007 6:19 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Error code 2 Karl I can't see enough from your posting, but if you are running UniVerse foreground processes from crontab as root then please don't especially AIX. Change to a non-root crontab Regards JayJay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 11 July 2007 15:07 To: u2-users@listserver.u2ug.org Subject: [U2] Error code 2 The following cron response came to me at 2:30pm in the day. We have programs that run at various times, but this is the first time I've seen this. What are the probable causes? TIA, Karl * BEGIN CRON EMAIL 1537 record(s) selected to SELECT list #0. A fatal error has occurred in UniVerse. Unable to re-open operating system file "" Error code 2 * cron: The previous message is the standard output and standard error of one of the cron commands. END CRON EMAIL --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Error code 2
one point I can make is that if a script thats run as root has some kind of "error" (by that I mean that it does something not intended) the damage can be severe (for example and yes this is a extreme example) your cron job's "job" is to clean up directories directory /data/archive (for example) but something happens and it gets the path / instead of /data/archive well as root you will wipe out the entire system, whereas a non root user you will not (or should not if your system is setup correctly) delete any OS files and while yes you may have to reinstall your data the OS itself should be fine like i said, I know this is an extreme example, it gives you an idea why a lot of system adman's only run as root cron jobs that HAVE to be run as root (i.e. requires root privileges BUT even this is discouraged as there are tons of programs that let processes run as root for certain commands ONLY (sudo for example)) now I suppose that you can argue if a program is ONLY generating reports or such that there is no danger BUT one additional thing to keep in mind is that if someone were to hack into your system and replace your report only program with say a program to change root's passed or modify some network setting, turn off your firewall, etc .. you have given them a way to run commands as root without having to know the root passed, whereas if it was run by a user they can do no more damage than the user could do once again an extreme example but I hope that I at least gave you some ideas why its not always a good idea to ruin commands as root from cron (or any other place where its not absolutely required) dougc [EMAIL PROTECTED] wrote: Ditto for me. When you come into a situation and 'we've always done it that way' is the phrase explaining 'why' it's nice to have good information to make a case to make a change. Thanks, Karl John, You've said this before. Could you elaborate a little more on this? We run many tasks on cron as root and have never had any problems both with Solaris and Linux. Jerry -Original Message- From: John Jenkins [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 11, 2007 6:19 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Error code 2 Karl I can't see enough from your posting, but if you are running UniVerse foreground processes from crontab as root then please don't especially AIX. Change to a non-root crontab Regards JayJay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 11 July 2007 15:07 To: u2-users@listserver.u2ug.org Subject: [U2] Error code 2 The following cron response came to me at 2:30pm in the day. We have programs that run at various times, but this is the first time I've seen this. What are the probable causes? TIA, Karl * BEGIN CRON EMAIL 1537 record(s) selected to SELECT list #0. A fatal error has occurred in UniVerse. Unable to re-open operating system file "" Error code 2 * cron: The previous message is the standard output and standard error of one of the cron commands. END CRON EMAIL --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ -- When you are SURE that everything in your program is correct AND your program STILL DOES NOT work, one thing you can be sure of is that something you are sure of is wrong - unknown --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Error code 2
Ditto for me. When you come into a situation and 'we've always done it that way' is the phrase explaining 'why' it's nice to have good information to make a case to make a change. Thanks, Karl > John, > You've said this before. Could you elaborate a little more on this? We > run many tasks on cron as root and have never had any problems both with > Solaris and Linux. > Jerry > > -Original Message- > From: John Jenkins [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 11, 2007 6:19 PM > To: u2-users@listserver.u2ug.org > Subject: RE: [U2] Error code 2 > > Karl > > I can't see enough from your posting, but if you are running UniVerse > foreground processes from crontab as root then please don't > especially > AIX. > > Change to a non-root crontab > > Regards > > JayJay > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: 11 July 2007 15:07 > To: u2-users@listserver.u2ug.org > Subject: [U2] Error code 2 > > The following cron response came to me at 2:30pm in the day. We have > programs that run at various times, but this is the first time I've seen > this. What are the probable causes? TIA, Karl > > * BEGIN CRON EMAIL > > 1537 record(s) selected to SELECT list #0. > A fatal error has occurred in UniVerse. > Unable to re-open operating system file "" > Error code 2 > > > * > cron: The previous message is the standard output > and standard error of one of the cron commands. > > > END CRON EMAIL > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ > -- Karl Pearson Director of I.T. ATS Industrial Supply, Inc. [EMAIL PROTECTED] http://www.atsindustrial.com 800-789-9300 x29 Local: 801-978-4429 Fax: 801-972-3888 "To mess up your Linux PC, you have to really work at it; to mess up a microsoft PC you just have to work on it." --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Error code 2
John, You've said this before. Could you elaborate a little more on this? We run many tasks on cron as root and have never had any problems both with Solaris and Linux. Jerry -Original Message- From: John Jenkins [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 11, 2007 6:19 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Error code 2 Karl I can't see enough from your posting, but if you are running UniVerse foreground processes from crontab as root then please don't especially AIX. Change to a non-root crontab Regards JayJay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 11 July 2007 15:07 To: u2-users@listserver.u2ug.org Subject: [U2] Error code 2 The following cron response came to me at 2:30pm in the day. We have programs that run at various times, but this is the first time I've seen this. What are the probable causes? TIA, Karl * BEGIN CRON EMAIL 1537 record(s) selected to SELECT list #0. A fatal error has occurred in UniVerse. Unable to re-open operating system file "" Error code 2 * cron: The previous message is the standard output and standard error of one of the cron commands. END CRON EMAIL --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Error code 2
Karl I can't see enough from your posting, but if you are running UniVerse foreground processes from crontab as root then please don't especially AIX. Change to a non-root crontab Regards JayJay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 11 July 2007 15:07 To: u2-users@listserver.u2ug.org Subject: [U2] Error code 2 The following cron response came to me at 2:30pm in the day. We have programs that run at various times, but this is the first time I've seen this. What are the probable causes? TIA, Karl * BEGIN CRON EMAIL 1537 record(s) selected to SELECT list #0. A fatal error has occurred in UniVerse. Unable to re-open operating system file "" Error code 2 * cron: The previous message is the standard output and standard error of one of the cron commands. END CRON EMAIL --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/