On 7/24/2012 4:50 PM, Wols Lists wrote:
On 24/07/12 20:08, Wjhonson wrote:
On nix, when you change users, you are saying it does not set any environment 
variables ?

Yes I am - by default at least.
if you do
su -
then you DO get the users environment, while we are getting a bit off topic (which is ok by me) my main user was that calling subversion I kept getting the same certificate error after accepting the certificate when teh command was run from the commandline. In this case it IS a path issue, so I tried the following:

1. in the shell script manually setting the PATH variable -- no go
2. modifying /etc/profile to add to the path (this SHOULD of worked but did not, I may need to dig deeper into this)

I ended up specifying the config dir in the subversion command and this worked.

If I write a service that starts off as root, then suids to something
else, it is down to MY PROGRAMMING to load that user's environment. If I
don't, it runs with the original environment.

That's why so many things written by inexperienced users and run from
cron keep breaking ...
well said or at least it helps explain why so many companies have cron jobs that run as root (and not because its doing system stuff) but rather because root has the right environment or permissions to do "x" instead of taking the time to setup a user to run the cron job.

Cheers,
Wol

again thanks to everyone who chimed in!

dougc

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to