SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Cant do setuid
Author Message
Post Cant do setuid 
Hello,

SuSE 9.1, Apache2.0.50

Trying to get the CGI part of BackupPC working. When I execute
BackupPC_Admin, either via the web browser, or from the command line (as
user backuppc), I get "Can't do setuid". The BackupPC_Admin script
permissions are '-r-sr-xr--', owned by user backuppc. 'suexec' is in
place and Apache finds it: Log file:

[Fri Jul 23 09:18:29 2004] [notice] suEXEC mechanism enabled (wrapper:
/usr/share/apache2/bin/suexec)

and it has suid permissions.

Apache was compiled with --enable-suexec. I'm not using mod_perl.
Another oddity is that if I run the 'printenv' script from Apache
(2.0.50) it doesn't have the REMOTE_USER variable set.

Anybody have any insight?

Thanks- Dan




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post Cant do setuid 
On Fri, 2004-07-23 at 12:29, Dan Weisenstein wrote:

Apache was compiled with --enable-suexec. I'm not using mod_perl.
Another oddity is that if I run the 'printenv' script from Apache
(2.0.50) it doesn't have the REMOTE_USER variable set.

Anybody have any insight?

I don't know about Suse but RH/fedora has a perl-suidperl package
that must be installed for setuid scripts to work. If you don't
have other people sharing virtual hosts on the box you can
simplify the problem by configuring backuppc to run as the same
user as httpd.

---
Les Mikesell
les < at > futuresource.com




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post Cant do setuid 
Dan Weisenstein writes:

SuSE 9.1, Apache2.0.50

Trying to get the CGI part of BackupPC working. When I execute
BackupPC_Admin, either via the web browser, or from the command line (as
user backuppc), I get "Can't do setuid". The BackupPC_Admin script
permissions are '-r-sr-xr--', owned by user backuppc. 'suexec' is in
place and Apache finds it: Log file:

[Fri Jul 23 09:18:29 2004] [notice] suEXEC mechanism enabled (wrapper:
/usr/share/apache2/bin/suexec)

and it has suid permissions.

Apache was compiled with --enable-suexec. I'm not using mod_perl.

First off, bisect the problem by running BackupPC_Admin as the
apache user (eg: http):

su http
BackupPC_Admin

If that works, then there is some problem with apache suexec.
If that doesn't work then there is some problem with the
setuid, possibly because your perl is not installed with the
emulate setuid option (is sperl5.8.X present?).

Another oddity is that if I run the 'printenv' script from Apache
(2.0.50) it doesn't have the REMOTE_USER variable set.

That's a different problem: you haven't setup up your .htaccess
authentication correctly.

Craig


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post Cant do setuid 
Thanks for all of the input. I solved both problems.

1) Used mod_perl and changed BackupPC_Admin to 755. That took care of the setuid problem.

2) Set REMOTE_USER in httpd.conf.

It all works fine now.

Dan


Craig Barratt wrote: Dan Weisenstein writes:

SuSE 9.1, Apache2.0.50

Trying to get the CGI part of BackupPC working. When I execute
BackupPC_Admin, either via the web browser, or from the command line (as
user backuppc), I get "Can't do setuid". The BackupPC_Admin script
permissions are '-r-sr-xr--', owned by user backuppc. 'suexec' is in
place and Apache finds it: Log file:

[Fri Jul 23 09:18:29 2004] [notice] suEXEC mechanism enabled (wrapper:
/usr/share/apache2/bin/suexec)

and it has suid permissions.

Apache was compiled with --enable-suexec. I'm not using mod_perl.

First off, bisect the problem by running BackupPC_Admin as the
apache user (eg: http):

su http
BackupPC_Admin

If that works, then there is some problem with apache suexec.
If that doesn't work then there is some problem with the
setuid, possibly because your perl is not installed with the
emulate setuid option (is sperl5.8.X present?).

Another oddity is that if I run the 'printenv' script from Apache
(2.0.50) it doesn't have the REMOTE_USER variable set.

That's a different problem: you haven't setup up your .htaccess
authentication correctly.

Craig


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/


--
Dan Weisenstein
General Manager
Tesoro Electronics
715 White Spar Road
Prescott, AZ 86303
928-771-2646


Display posts from previous:
Reply to topic Page 1 of 1
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
  


Magic SEO URL for phpBB