Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Apache 1.3x]Using different users for different pages. HOW?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
BobOki
n00b
n00b


Joined: 23 Feb 2004
Posts: 67
Location: Svannah, Ga

PostPosted: Wed Mar 24, 2004 1:57 pm    Post subject: [Apache 1.3x]Using different users for different pages. HOW? Reply with quote

I need to get apache to run as user vpopmail when a user accesses mail.boboki.com.
Currently I have this setup via a Vhost, but i have no clue how to specify what user to run it as.
Any help would be appreciated!
_________________
We the willing lead by the unknowing have done so much for so long with so little, we are now capable of doing everything with nothing.


Last edited by BobOki on Fri Mar 26, 2004 8:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
BobOki
n00b
n00b


Joined: 23 Feb 2004
Posts: 67
Location: Svannah, Ga

PostPosted: Fri Mar 26, 2004 8:41 pm    Post subject: Reply with quote

I still cannot find any information on the net about this one.
_________________
We the willing lead by the unknowing have done so much for so long with so little, we are now capable of doing everything with nothing.
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Fri Mar 26, 2004 10:53 pm    Post subject: Reply with quote

I don't know that this is possible.

Perhaps you can explain what you want to achieve so that useful suggestions can be made.
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
bone
Apprentice
Apprentice


Joined: 07 Jun 2002
Posts: 255
Location: Midwest, USA

PostPosted: Fri Mar 26, 2004 11:02 pm    Post subject: Reply with quote

Can you explain exactly why you have to get apache to run as that user when accessing that vhost?
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Sat Mar 27, 2004 5:09 am    Post subject: Reply with quote

A single Apache server, and all its server subprocesses, run as a single operating system user. There's nothing you can do about that. You can run multiple separate Apache servers as different users but they cannot all listen on the same port. If you want separate users for separate virtual hosts on the same port then you have a problem.

If what is required is the ability for CGI scripts to run as different users for different vhosts then there is something that can be done. You need to look at the SuExec wrapper.

If the request for separate users is to allow the Apache server to read or write directories belonging to vpopmail then this is better achieved by getting the vpopmail directory permissions right.

The original request is more complicated than a one-liner, and it really depends on what the OP wants to achieve.
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
BobOki
n00b
n00b


Joined: 23 Feb 2004
Posts: 67
Location: Svannah, Ga

PostPosted: Sat Mar 27, 2004 3:28 pm    Post subject: Reply with quote

I have to have the vhost squirrelmail work as user vpopmail, or it will not allow users to change thier password.
_________________
We the willing lead by the unknowing have done so much for so long with so little, we are now capable of doing everything with nothing.
Back to top
View user's profile Send private message
bone
Apprentice
Apprentice


Joined: 07 Jun 2002
Posts: 255
Location: Midwest, USA

PostPosted: Tue Apr 06, 2004 2:01 am    Post subject: Reply with quote

There is a User and Group setting that you can use in the <VirtualHost> sections of your config. I am not entirely sure how they work, so I would suggest you read up on them on the apache web site, but my understanding is that they will allow extra privliedges for read/write/execute on that VH. Let me know if this helps.
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Tue Apr 06, 2004 3:20 am    Post subject: Reply with quote

The User and Group directives set the user and group, respectively, that the server will imitate when serving requests. They can, and do in a default Gentoo install, appear in the global section of the config. Under 1.3.x they may also appear under a <VirtualHost> directive where they affect the running of CGI scripts only and require the correct configuration of suExec. Non-CGI requests are still processed with the user specified in the main User directive.

User and Group are not permitted in <VirtualHost> sections from Apache 2.0 onwards.

To emulate Apache 1.3 behaviour you want the SUExecUserGroup directive. This affects only CGI scripts run by the server, not the server itself.

For Apache 2 there is also the AssignUserID directive. There does not, from a brief reading of the manual, seem to be a limitation to only CGI. WARNING: The MPM perchild facility, needed for this to work, is described on the Apache web pages as "This module is not functional. Development of this module is not complete and is not currently active. Do not use perchild unless you are a programmer willing to help fix it."
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
bone
Apprentice
Apprentice


Joined: 07 Jun 2002
Posts: 255
Location: Midwest, USA

PostPosted: Wed Apr 07, 2004 1:09 am    Post subject: Reply with quote

Thanks for the info Chris W. I guess my limited experience with User and Group settings in the <VirtualHost> directives were in the 1.x branch of Apache.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum