You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Adrian <ad...@gmail.com> on 2006/06/03 17:32:22 UTC

[users@httpd] user/group directives don't change PHP permissions?

Hi,

I'm trying to use this simple php file upload tool:
http://www.webfilebrowser.org/

I'm using the apache config below (with mod_php). For
some reason I can't use the script unless the files are
owned or are readable by the main web user (www)...
How do I make them viewable by 'domainname_user' -
that seems to only be for the purpose of cgi scripts?
What's the best solution in this case?

<VirtualHost www.domainname.com>
ServerName www.domainname.com
DocumentRoot /www/domainname
ScriptAlias /cgi-bin/ /www/domainname/cgi-bin/
User domainname_user
Group domainname_user
</VirtualHost>

I'd appreciate any help you can give.

Thanks,
Adrian.

---------------------------------------------------------------------
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] user/group directives don't change PHP permissions?

Posted by Joshua Slive <jo...@slive.ca>.
On 6/3/06, Adrian <ad...@gmail.com> wrote:
> Hi,
>
> I'm trying to use this simple php file upload tool:
> http://www.webfilebrowser.org/
>
> I'm using the apache config below (with mod_php). For
> some reason I can't use the script unless the files are
> owned or are readable by the main web user (www)...
> How do I make them viewable by 'domainname_user' -
> that seems to only be for the purpose of cgi scripts?
> What's the best solution in this case?
>
> <VirtualHost www.domainname.com>
> ServerName www.domainname.com
> DocumentRoot /www/domainname
> ScriptAlias /cgi-bin/ /www/domainname/cgi-bin/
> User domainname_user
> Group domainname_user
> </VirtualHost>

You seem to be using Apache 1.3.  In this version, User/Group inside
<VirtualHost> are used by suexec for CGI script execution.  In 2.x,
this has been changed to the clearer SuexecUserGroup directive.

There is no way to make an apache module (like php) run under
different users for different vhosts.  You can, however, use php as a
CGI script under suexec if you want to do that.  This question appears
on this list at least once a month.

Joshua.

---------------------------------------------------------------------
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