Kevin Lo wrote:
JR Dalrymple wrote:
Nikolay Sturm wrote:
* JR Dalrymple [2005-06-21]:
I can get Openwebmail going on Freebsd using fairly standard procedures.
I want it running on OpenBSD. There is both a package and a port for
both, I've tried both with no luck.
This is not an exact description of the problem. Some relevant
information would be whether or not your apache is running chroot'ed or
not.
Sorry that my problem description is lacking. The 'symptom' is the error
message below when you try to browse to
http://mailserver/cgi-bin/openwebmail/openwebmail.pl.
The steps I've taken so far:
-install the port (or package, they basically come out the same)
-use the included c wrapper in a fashion similar to
stacy# perl wrapsuid.pl /var/www/cgi-bin/openwebmail/o*.pl
-set the permissions on the resulting wrapped scripts
stacy# chmod 4555 /var/www/cgi-bin/openwebmail/o*.pl
You don't have to use the script wrapsuid.pl and set the permissons.
The permissions are right by default after installing openwebmail port
or package.
I noticed that the permissions looked good until I used the wrapper,
then they lost their suid bit. Is it appropriate then to rebuild Perl
with suid support then since the wrapper isn't necessary?
-remove nosuid from the fstab entry for /var and reboot
[snip]
Thanks for your guys' help and I'll get more info as soon as I can.
Kevin
Starting from scratch:
Fresh install of 3.7 release, one user added and nosuid pulled from
fstab entry for /var filesystem before reboot:
$ uname -a
OpenBSD stacy.jrssite.com 3.7 GENERIC#50 i386
$ su
Password:
stacy# pkg_add -v
ftp://ftp3.usa.openbsd.org/pub/OpenBSD/3.7/packages/i386/openwebmail-2.51.tgz
<snip>
stacy# exit
$ cd /var/www/cgi-bin/openwebmail
$ ls -lF
total 2448
drwxr-xr-x 2 root _mail 512 Jun 21 16:44 auth/
drwxr-xr-x 6 root _mail 512 Jun 21 16:44 misc/
drwxr-xr-x 2 root _mail 512 Jun 21 16:44 modules/
-r-sr-xr-x 1 276 _mail 264663 Mar 17 15:04 openwebmail-abook.pl*
-r-sr-xr-x 1 276 _mail 27911 Mar 17 15:04 openwebmail-advsearch.pl*
-r-sr-xr-x 1 276 _mail 114770 Mar 17 15:04 openwebmail-cal.pl*
-r-sr-xr-x 1 276 _mail 26033 Mar 17 15:04 openwebmail-folder.pl*
-r-sr-xr-x 1 276 _mail 70560 Mar 17 15:04 openwebmail-main.pl*
-r-sr-xr-x 1 276 _mail 139617 Mar 17 15:04 openwebmail-prefs.pl*
-r-sr-xr-x 1 276 _mail 76944 Mar 17 15:04 openwebmail-read.pl*
-r-sr-xr-x 1 276 _mail 23155 Mar 17 15:04 openwebmail-saprefs.pl*
-r-sr-xr-x 1 276 _mail 114738 Mar 17 15:04 openwebmail-send.pl*
-r-sr-xr-x 1 276 _mail 25166 Mar 17 15:04 openwebmail-spell.pl*
-r-sr-xr-x 1 276 _mail 58102 Mar 17 15:04 openwebmail-tool.pl*
-r-sr-xr-x 1 276 _mail 49130 Mar 17 15:04 openwebmail-vdomain.pl*
-r-sr-xr-x 1 276 _mail 19192 Mar 17 15:04 openwebmail-viewatt.pl*
-r-sr-xr-x 1 276 _mail 118571 Mar 17 15:04 openwebmail-webdisk.pl*
-r-sr-xr-x 1 276 _mail 35830 Mar 17 15:04 openwebmail.pl*
-rwxr-xr-x 1 276 _mail 4855 Jan 28 22:11 preload.pl*
drwxr-xr-x 2 root _mail 512 Jun 21 16:45 quota/
drwxr-xr-x 2 root _mail 512 Jun 21 16:45 shares/
-rwxr-xr-x 1 276 _mail 4105 Jan 28 22:20 userstat.pl*
-rwxr-xr-x 1 276 _mail 19301 Jan 28 22:11 vacation.pl*
$ perl ./openwebmail.pl
Content-type: text/html
'./openwebmail.pl' must setuid to root$ su
Password:
stacy# apachectl start
stacy#
<try to log in over http, get 500 error>
cat /var/www/logs/error_log
[Tue Jun 21 17:25:38 2005] [error] (2)No such file or directory: exec of
/cgi-bin/openwebmail/openwebmail.pl failed
[Tue Jun 21 17:25:38 2005] [error] [client 192.168.0.4] Premature end of
script headers: /cgi-bin/openwebmail/openwebmail.pl
stacy#
So now I rebuild perl with suidperl support, or how to make this work? I
don't read on google, OpenBSD forums, or OWM forums where that anyone
else has any trouble with the package so I figured it "just worked", but
am really feeling like a total idiot here.
Thanks again for your help.