[FASTCGI] FastCGI app with unique uid:gid

Donovan Brooke lists at euca.us
Tue Jun 1 15:06:45 EDT 2010


Hello..

signed up a few days ago and I am not clear if this
is the right place to post this question or not.. however,
I'll give it a shot.

Ubuntu 9.04
Apache Apache/2.2.11 and mod_fcgid

So, I'm working with a company that is working on a
fastCGI version of their product. It is similar to
a php in that it is a scripting language.

a little background before I ask the question...

I want to get a fastCGI app running as a
specific user:group.

I've set up a (Local) Name Based virtual host that has these
characteristics:

-------
<VirtualHost *.80>
         ServerName fastcgitest.com
         ServerAlias www.fastcgitest.com
         ServerAdmin webmaster at localhost
         DocumentRoot /home/fastcgitest/www
         ScriptAlias /cgi-bin/ /home/fastcgitest/cgi-bin/
         <Directory /home/fastcgitest/www>
                 Options FollowSymLinks
                 AllowOverride All
         </Directory>
         <Directory /home/fastcgitest/cgi-bin>
                 Options +ExecCGI
                 SetHandler fcgi-script
         </Directory>
  [snip]
</VirtualHost>
--------

Everything from /home/fastcgitest
and down has a user:group of fastcgitest:fastcgitest

I've put my fastCGI app inside the /home/fastcgitest/cgi-bin/
directory.

Then, I have a .htaccess file in the /home/fastcgitest/www
directory as so:

--------
<IfModule mime_module>
AddType text/html .dono
</IfModule>

Options +ExecCGI
AddHandler fcgid-script .dono

FCGIWrapper /home/fastcgitest/cgi-bin/WebCatalogEngine/WebDNA.fcgi .dono
--------

DNS is set up in my LAN.

O.K., so when I access my test file through a browser:
http://fastcgitest.com/test.dono

It parses just fine other than the WebDNA.fcgi cannot write to the
directories owned by the unique user for that virtual host
(fastcgitest:fastcgitest)... which is something I need it to do.

I realized that it's because WebDNA.fcgi is still running as 'www-data'
(which is the default user for apache on Ubuntu), even though the
executable is owned:grouped by fastcgitest:fastcgitest

So, finally I come to the question:

What's the best way to get my WebDNA.fcgi app to run as user:group
fastcgitest:fastcgitest?

btw, I posted this question to the apache users group, and I received:
http://www.itech7.com/Linux/Apache2-PHP-FastCGI-SuExec back from
the site owner... looking at that now.

Thanks!

Donovan




-- 
D Brooke


More information about the FastCGI-developers mailing list