in reply to Script works when run with sudo, but not when run directly as root...?
Which perl is being run? su - root will get you root's login shell along with root's default environment. sudo blah blah blah gets you your environment (notwithstanding any settings in your sudo configuration).
Try the difference between the env and which perl commands in both environments.
--MidLifeXis
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Script works when run with sudo, but not when run directly as root...?
by bmalnad (Initiate) on May 07, 2014 at 20:42 UTC | |
by hippo (Archbishop) on May 07, 2014 at 21:00 UTC | |
by Laurent_R (Canon) on May 07, 2014 at 22:13 UTC |