Alessandro Vesely writes:

Sam Varshavchik wrote:
Alessandro Vesely writes:

Sam,
is there a reason why rx permissions are not given to webmail?
[EMAIL PROTECTED]@/courier/webmail        700    x    root    bin
[EMAIL PROTECTED]@/courier/webmail        755    x    root    bin

Because webmail is started by root.

I meant the small (~17K) cgi executable, not the daemon. Well, actually, the directory it leaves in.

It needs to start as root, of course, in order to drop root to the appropriate uid/gid for each account.

Hm... I found a setuidgid() function in sqwebmail.c, but I have no clue about how it works. The small exec is in the directory mentioned above, and is not setuid. I just placed a symbolic link to it from an Apache's cgi-bin directory. It apparently works alright. Isn't that the correct way to install it?

Yes, pretty much. It takes each HTTP request, connects to the socket that sqwebmaild listens on, and forward the request to sqwebmaild, which then drops root and handles the request.

As far as your original question goes, upon closer look, @libexecdir@/courier/webmail is really the subdirectory that holds the webmail and webmlm stubs. By default, the directory is not globally accessible. INSTALL tells you to manually move these binaries out of there, and into your cgi-bin directory, if you want to. If you don't, the permissions prevent those binaries from being executed from the command line:

@libexecdir@/courier/webmail            700     x       root    bin
@libexecdir@/courier/webmail/webmail    555     x       root    bin
@libexecdir@/courier/webmail/webmlm     555     x       root    bin


Attachment: pgpYsx6gG5YaS.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to