The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
find number of incoming requests to a server laddu UNIX for Dummies Questions & Answers 1 03-10-2007 01:48 AM
Check incoming mail to sendmail kingdbag UNIX for Dummies Questions & Answers 1 01-25-2007 11:32 PM
loggin incoming ftp connections in syslog zuessh AIX 2 05-31-2006 05:07 PM
rlogin/rsh incoming port andryk High Level Programming 1 08-17-2004 10:21 AM
Listening on port for incoming data? frustrated1 Shell Programming and Scripting 6 01-16-2004 06:48 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-21-2008
jojo77 jojo77 is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 5
run a script from incoming email

hi
I have a bit of a problem i need help with.
I have a script that runs no problems when i run it manually. as soon as i stick in
tester: /app/scripts/run.pl
into /etc/aliases & try to run it by sending a mail it doesnt work.
the output files are owned by daemon, which i dont like & think may be the problem.


(the script calls a binary that logs onto a remote server (without prompts or interaction) which then does its thing ( i have no choice i must use this method to reach the final program))

& its perfectly fine if i run it manually & apparently others in the company had been able to make their script run from aliases.
but i'm a newbie & learning as i go.


so, how can i get a script executed by daemon to be ran as a user & not daemon.

on solaris 10.

thanks
  #2 (permalink)  
Old 02-21-2008
matt.d's Avatar
matt.d matt.d is offline
Registered User
  
 

Join Date: Feb 2008
Location: /dev/null
Posts: 62
I'm having a little trouble following, but I think this might work for you:

Code:
vi program.pl
paste the program text into this file and save it
chmod 755 program.pl
./program.pl
  #3 (permalink)  
Old 02-22-2008
jojo77 jojo77 is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 5
getting the script to run manually is no problem. its even got 777 perms
the problem i think is it is running as daemon when it gets called from /etc/aliases.
& if i can change it to run as me or nobody then i can eliminate 1 possible answer

thanks
  #4 (permalink)  
Old 02-22-2008
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,119
as with 'crontab'... make sure that your 'script' has all the neccessary enviroment variables defined at the point of a execution. If necessary, wrap your script with the 'wrapper' script that defines the env. vars and calls the script then.
  #5 (permalink)  
Old 02-22-2008
jojo77 jojo77 is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 5
that sound like a plan, except i dont know how to define the environment to run as as specific user.
  #6 (permalink)  
Old 02-22-2008
matt.d's Avatar
matt.d matt.d is offline
Registered User
  
 

Join Date: Feb 2008
Location: /dev/null
Posts: 62
If you put it into your crontab it will run under your username.
Closed Thread

Bookmarks

Tags
solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:09 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0