You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Gordon Thagard <go...@eng.fsu.edu> on 2005/10/25 21:50:31 UTC

[users@httpd] suEXEC question

Hello All,

I'm unclear as to how one part of suEXEC works. Specifically, I'm 
refering to the documentation located at 
http://httpd.apache.org/docs/1.3/suexec.html#usage:

*User directories:*
The suEXEC wrapper can also be used to execute CGI programs as the user 
to which the request is being directed. This is accomplished by using 
the "*|~|*" character prefixing the user ID for whom execution is 
desired. The only requirement needed for this feature to work is for CGI 
execution to be enabled for the user and that the script must meet the 
scrutiny of the security checks 
<http://httpd.apache.org/docs/1.3/suexec.html#model> above.

After reading the security checks list it seems somewhat clear that only 
the apache (perhaps the "nobody" user, as that's how I've set mine) user 
can execute cgi or PHP code. I want users to be able to authenticate and 
then be able to:

a. change passwords
b. turn off/on vacation via /usr/local/bin/vacation
c. turn off/on spam filtering via adding/removing a pre-written 
.mailfilter file into/out of the user's home directory

Is this possible via the User directories usage description above or is 
there another way or no way using Apache?

Thanks to any and all who may be of assistance.

Cheers,

Gordon Thagard

---------------------------------------------------------------------
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] suEXEC question

Posted by Joshua Slive <js...@gmail.com>.
On 10/26/05, Gordon Thagard <go...@eng.fsu.edu> wrote:
> I see your point regarding sudo. This opens up a can of security-related
> worms. Could anyone suggest a safe, reliable way to authenticate users
> via Apache and then execute code as the user to do things like:
>
> * change passwords
> * turn off/on vacation

It is not sudo itself that is dangerous, it is the whole concept.
See
http://httpd.apache.org/docs/1.3/misc/FAQ.html#passwdauth
for discussion of some of the issues.

If I really had to do this, I would probably use an ordinary CGI
script on the apache-side, which would communicate with another
program that would use sudo to make the actual changes.  The key would
be making the communication channel between the cgi script and this
other program as simple and secure as possible, and assuring that
input is checked carefully at each stage of processing.

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


Re: [users@httpd] suEXEC question

Posted by Gordon Thagard <go...@eng.fsu.edu>.
I see your point regarding sudo. This opens up a can of security-related 
worms. Could anyone suggest a safe, reliable way to authenticate users 
via Apache and then execute code as the user to do things like:

* change passwords
* turn off/on vacation

Regards,

Joshua Slive wrote:

>On 10/25/05, Gordon Thagard <go...@eng.fsu.edu> wrote:
>
>  
>
>>After reading the security checks list it seems somewhat clear that only
>>the apache (perhaps the "nobody" user, as that's how I've set mine) user
>>can execute cgi or PHP code. I want users to be able to authenticate and
>>then be able to:
>>
>>a. change passwords
>>b. turn off/on vacation via /usr/local/bin/vacation
>>c. turn off/on spam filtering via adding/removing a pre-written
>>.mailfilter file into/out of the user's home directory
>>
>>Is this possible via the User directories usage description above or is
>>there another way or no way using Apache?
>>    
>>
>
>No, this is not a good usage of suexec.  You would need to put cgi
>scripts in each users home directory to make it work.
>
>You should look into sudo, but be very careful.  Allowing access to
>regular accounts over the web is a good way to compromise your server.
>
>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


Re: [users@httpd] suEXEC question

Posted by Joshua Slive <js...@gmail.com>.
On 10/25/05, Gordon Thagard <go...@eng.fsu.edu> wrote:

> After reading the security checks list it seems somewhat clear that only
> the apache (perhaps the "nobody" user, as that's how I've set mine) user
> can execute cgi or PHP code. I want users to be able to authenticate and
> then be able to:
>
> a. change passwords
> b. turn off/on vacation via /usr/local/bin/vacation
> c. turn off/on spam filtering via adding/removing a pre-written
> .mailfilter file into/out of the user's home directory
>
> Is this possible via the User directories usage description above or is
> there another way or no way using Apache?

No, this is not a good usage of suexec.  You would need to put cgi
scripts in each users home directory to make it work.

You should look into sudo, but be very careful.  Allowing access to
regular accounts over the web is a good way to compromise your server.

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