CGI web programming help

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

BetterSense

Well-Known Member
Joined
Jul 17, 2011
Messages
1,025
Reaction score
59
Location
Richardson
I want to write a program where

-the user chooses to upload a file (I have this working)
-the CGI program slices and dices the file (this works)
-the website then presents the resulting file-chunks to the user as html links (I'm stumped on this)

The problem I have is that the webserver runs as user 'nobody'. The cgi-bin directory and programs in it are world-executable, but apparently the output from the cgi script when the webserver is executing it inherits the 'nobody' privileges so the CGI program can't write output anywhere. I can create a world-writable directory, but that seems like a Bad Idea. Now I'm thinking about creating a world-writable directory outside the web document root, then creating a world-readable directory inside the web root that links to the world-writable one, and putting links to that in my output.

What is the actual correct thing to do?
 
Back
Top