Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » All Things Unix » running a shell script via cgi web interface
Search Topic:
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
FreeBSD traffic shaping - finding the right scheduler »
« I guess permissions are important.  
AuthorAll Replies


Sir Meowmix III

@windstream.net

reply to Dennis
Re: running a shell script via cgi web interface

I believe that 'nobody' should be able to write to /tmp without issue, would you mind sharing the code here? I'm assuming it's written in Bash?

How are you handling, in the code, the HTTP POST/GET? How are you sure it's working correctly, are you able to echo it back and see it? Are you correctly reading the CGI input from stdin?


Dennis
Premium,Mod
join:2001-01-26
Algonquin, IL
·AT&T Yahoo

Host:
Chicago
Users Find Hot Deals
Users find Hot Dea..
Requests for Hot D..
Home Repair & Impr..

1 edit
well, here is the jist of the code...at least the part I am having problems with. I have to remove some bits of it since it's for work and all...

here's teh cgi:

and here is the shell script called dennis.sh


Those touches in the beginning....never happen. I works just fine when I do it from the cli of course...but not via apache. I originally added them in order try and fix this problem but tit seems they don't. And of course the $1 is the variable I'm passing.

When I have it use a pre-existing file (which won't work for me, was only for testing) then this is the ownership I get.

--
My Blog. Because I desperately need the acknowledgement of others.

Visit the Judd Family website to see my kids!


nwrickert
sand groper
Premium,MVM
join:2004-09-04
Geneva, IL
Those touches in the beginning....never happen.
That's probably because "$1" is undefined.
--
AT&T dsl; Westell 327w modem/router; openSuSE 11.0; firefox 3.0.10


Dennis
Premium,Mod
join:2001-01-26
Algonquin, IL
·AT&T Yahoo

Host:
Chicago
Users Find Hot Deals
Users find Hot Dea..
Requests for Hot D..
Home Repair & Impr..

2 edits
said by nwrickert See Profile :

Those touches in the beginning....never happen.
That's probably because "$1" is undefined.
....ok well so if that's the case then if the touches are indeed happening, there must be frament files in the /tmp directory...


so yeah, ok.....the variable must not be passing. So $1 is just a cli variable, and $HTTP_POST would be necessary in its stead.

I'll try that and see what happens.

--
My Blog. Because I desperately need the acknowledgement of others.

Visit the Judd Family website to see my kids!
-
Forums » Tech and Talk » OS and Software » All Things UnixFreeBSD traffic shaping - finding the right scheduler »
« I guess permissions are important.  


Wednesday, 02-Dec 12:52:43 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 10 years online! © 1999-2009 dslreports.com.republican-creole
page compression OFF
Most commented news this week
· [159] Comcast Releasing Promised Usage Meter
· [73] Latest Consumer Reports Survey Not Kind To AT&T
· [69] Baltimore To Ban Lazy Cable Installs
· [60] Broadband Killed The Game Console
· [54] Rogers Unveils The ISP Dream Model
· [48] Graduate Student Unveils Sprint's GPS Sharing With Feds
· [46] ACTA: Global Three Strikes
· [41] Rural Carriers Quickly Embracing Fiber
· [36] Charter Exits Chapter 11
· [33] AT&T Top Lobbyist Cicconi Has His Feelings Hurt
Most people now reading
· Data Usage Meter Launched [Comcast HSI]
· IMG 1.7 (IMG Updates and Discussion) [Verizon FIOS TV]
· So I found a gold mine... [World of Warcraft]
· MS admits Windows Updates principally created to annoy [Security]
· Ooma changing features [VOIP Tech Chat]
· Windows 7 boot manager editing questions [Microsoft Help]
· UBB round 2 at the CRTC [Canadian Broadband]
· [Business] how to bridge a smc 8014 business class modem [Comcast HSI]
· Am I the only one that loves to work in IT? [No, I Will Not Fix Your #@$!! Computer]
· LFM Overkill [World of Warcraft]