You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Donovan Brooke <li...@euca.us> on 2010/05/28 22:20:53 UTC

[users@httpd] Running a fastCGI app as a specific user:group

Hello,

Ubuntu 9.04
Apache Apache/2.2.11

Sorry if this is long.. trying to give a little
accurate 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@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
--------

I've also setup the DNS 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:

How do I get my WebDNA.fcgi app to run as user:group 
fastcgitest:fastcgitest?

Thanks!

Donovan




-- 
D Brooke

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Running a fastCGI app as a specific user:group

Posted by Donovan Brooke <li...@euca.us>.
Nilesh Govindarajan wrote:
> On Sat, May 29, 2010 at 1:50 AM, Donovan Brooke <li...@euca.us> wrote:
[snip]
>> So, finally I come to the question:
>>
>> How do I get my WebDNA.fcgi app to run as user:group
>> fastcgitest:fastcgitest?
>>
>> Thanks!
>>
>> Donovan
[snip]
> 
> 
> http://www.itech7.com/Linux/Apache2-PHP-FastCGI-SuExec



Thanks!.. will take a closer look after the US holiday.

Donovan


-- 
D Brooke

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Running a fastCGI app as a specific user:group

Posted by Nilesh Govindarajan <li...@itech7.com>.
On Sat, May 29, 2010 at 1:50 AM, Donovan Brooke <li...@euca.us> wrote:
> Hello,
>
> Ubuntu 9.04
> Apache Apache/2.2.11
>
> Sorry if this is long.. trying to give a little
> accurate 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@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
> --------
>
> I've also setup the DNS 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:
>
> How do I get my WebDNA.fcgi app to run as user:group
> fastcgitest:fastcgitest?
>
> Thanks!
>
> Donovan
>
>
>
>
> --
> D Brooke
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


http://www.itech7.com/Linux/Apache2-PHP-FastCGI-SuExec

-- 
Nilesh Govindarajan
Facebook: nilesh.gr
Twitter: nileshgr
Website: www.itech7.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org