Solved

Setuid Driver - Make Install error in FreeBSD (Roundcube Vacation)

Posted on 2012-04-05
22
2,287 Views
Last Modified: 2016-02-10
Hi,
I have installed this plugin and I am using the setuid driver.

https://sourceforge.net/projects/rcubevacation/

README:
README.txt


I have had to change the config.mk settings WEBUSER = apache now when I try to recompile using make I get the following error:

Basically it says the same thing for every line of the file...see contents below:

"squirrelmail_vacation_proxy.c", line 75: Need an operator
"squirrelmail_vacation_proxy.c", line 76: Need an operator
"squirrelmail_vacation_proxy.c", line 77: Need an operator
"squirrelmail_vacation_proxy.c", line 78: Missing dependency operator
"squirrelmail_vacation_proxy.c", line 79: Need an operator
"squirrelmail_vacation_proxy.c", line 80: Need an operator
"squirrelmail_vacation_proxy.c", line 81: Need an operator
"squirrelmail_vacation_proxy.c", line 82: Need an operator
"squirrelmail_vacation_proxy.c", line 83: Need an operator
"squirrelmail_vacation_proxy.c", line 88: Missing dependency operator
"squirrelmail_vacation_proxy.c", line 89: Need an operator
"squirrelmail_vacation_proxy.c", line 90: Need an operator
"squirrelmail_vacation_proxy.c", line 91: Need an operator
"squirrelmail_vacation_proxy.c", line 92: Need an operator
"squirrelmail_vacation_proxy.c", line 328: Need an operator
make: fatal errors encountered -- cannot continue


Can you please help me figure out what is wrong?

Here are the contents of the directory I am trying to recompile to then install:

-rw-rw-rw-  1 root  webapps    549 Apr  4 22:20 Makefile
-rw-rw-rw-  1 root  webapps   1056 Apr  5 00:48 config.mk
-rw-rw-rw-  1 root  webapps  16502 Oct  1  2009 squirrelmail_vacation_proxy
-rw-rw-rw-  1 root  webapps   7730 Oct  1  2009 squirrelmail_vacation_proxy.c

Here is what is in the Makefile file:

.include "config.mk"


^M
.include "squirrelmail_vacation_proxy.c"
^M
OBJECTS = squirrelmail_vacation_proxy.o^M
LIBS = $(LCRYPT)^M
^M
squirrelmail_vacation_proxy: $(OBJECTS)^M
        cc -o squirrelmail_vacation_proxy $(LFLAGS) $(OBJECTS) $(LIBS)^M
^M
install: squirrelmail_vacation_proxy ^M
        install -g root -o root -m 4755 squirrelmail_vacation_proxy $(BINDIR)^M
^M
clean:^M
        rm -f *.o *~* core squirrelmail_vacation_proxy ^M
^M
squirrelmail_vacation_proxy.o: squirrelmail_vacation_proxy.c^M
        cc -c $(CFLAGS) $(DEBUG) $(USESHADOW) $(NOROOT) $(RESTRICTUSE) -D WEBUSER=\"$(WEBUSER)\" squirrelmail_vacation_proxy.c^M
~

I get almost the same error issuing the make install command.

Thank You
0
Comment
Question by:khapbc
  • 11
  • 11
22 Comments
 
LVL 34

Expert Comment

by:Duncan Roe
Comment Utility
The ^M symbols look like carriage returns (Windows contamination ;). Make sure the Makefile and all other text-containing files (.c, .h &c.) are free of them. You can do this with dos2unix. Or start again with a fresh restore from the distribution file (.tar.gz or whatever).
0
 

Author Comment

by:khapbc
Comment Utility
Ok Thank You I did remove the ^M from the Makefile and that helped.  I also had to change the syntax of the include statements from #include <filename> to .include <filename> which cut down on the errors I got.  But now I am still getting errors in from the squirrelmail_vacation_proxy file when I use the make command.  here are the errors:


"squirrelmail_vacation_proxy.c", line 1: Need an operator
"squirrelmail_vacation_proxy.c", line 2: Need an operator
"squirrelmail_vacation_proxy.c", line 3: Need an operator
"squirrelmail_vacation_proxy.c", line 4: Need an operator
"squirrelmail_vacation_proxy.c", line 5: Need an operator
"squirrelmail_vacation_proxy.c", line 7: Need an operator
"squirrelmail_vacation_proxy.c", line 8: Need an operator
"squirrelmail_vacation_proxy.c", line 9: Need an operator
"squirrelmail_vacation_proxy.c", line 10: Need an operator
"squirrelmail_vacation_proxy.c", line 11: Need an operator
"squirrelmail_vacation_proxy.c", line 12: Need an operator
"squirrelmail_vacation_proxy.c", line 14: Need an operator
"squirrelmail_vacation_proxy.c", line 15: Need an operator
"squirrelmail_vacation_proxy.c", line 17: Need an operator
"squirrelmail_vacation_proxy.c", line 19: Need an operator
"squirrelmail_vacation_proxy.c", line 20: Need an operator
"squirrelmail_vacation_proxy.c", line 21: Need an operator
"squirrelmail_vacation_proxy.c", line 23: Could not find sys/types.h
"squirrelmail_vacation_proxy.c", line 24: Could not find sys/stat.h
"squirrelmail_vacation_proxy.c", line 25: Could not find sys/wait.h
"squirrelmail_vacation_proxy.c", line 26: Could not find unistd.h
"squirrelmail_vacation_proxy.c", line 27: Could not find fcntl.h
"squirrelmail_vacation_proxy.c", line 28: Could not find syslog.h
"squirrelmail_vacation_proxy.c", line 29: Could not find stdlib.h
"squirrelmail_vacation_proxy.c", line 30: Could not find stdio.h
"squirrelmail_vacation_proxy.c", line 31: Could not find strings.h
"squirrelmail_vacation_proxy.c", line 33: Could not find strings.h
"squirrelmail_vacation_proxy.c", line 34: Could not find pwd.h
"squirrelmail_vacation_proxy.c", line 35: Could not find string.h
"squirrelmail_vacation_proxy.c", line 37: Could not find errno.h
"squirrelmail_vacation_proxy.c", line 39: Could not find crypt.h
"squirrelmail_vacation_proxy.c", line 45: Need an operator
"squirrelmail_vacation_proxy.c", line 46: Need an operator
"squirrelmail_vacation_proxy.c", line 47: Need an operator
"squirrelmail_vacation_proxy.c", line 48: Need an operator
"squirrelmail_vacation_proxy.c", line 49: Need an operator
"squirrelmail_vacation_proxy.c", line 50: Need an operator
"squirrelmail_vacation_proxy.c", line 52: Need an operator
"squirrelmail_vacation_proxy.c", line 58: Need an operator
"squirrelmail_vacation_proxy.c", line 61: Need an operator
"squirrelmail_vacation_proxy.c", line 62: Need an operator
"squirrelmail_vacation_proxy.c", line 64: Missing dependency operator
"squirrelmail_vacation_proxy.c", line 65: Need an operator
"squirrelmail_vacation_proxy.c", line 67: Missing dependency operator
"squirrelmail_vacation_proxy.c", line 68: Need an operator
"squirrelmail_vacation_proxy.c", line 69: Need an operator
"squirrelmail_vacation_proxy.c", line 70: Need an operator
"squirrelmail_vacation_proxy.c", line 75: Need an operator
"squirrelmail_vacation_proxy.c", line 76: Need an operator
"squirrelmail_vacation_proxy.c", line 77: Need an operator
"squirrelmail_vacation_proxy.c", line 78: Need an operator
"squirrelmail_vacation_proxy.c", line 79: Need an operator
"squirrelmail_vacation_proxy.c", line 80: Missing dependency operator
"squirrelmail_vacation_proxy.c", line 81: Need an operator
"squirrelmail_vacation_proxy.c", line 82: Need an operator
"squirrelmail_vacation_proxy.c", line 83: Need an operator
"squirrelmail_vacation_proxy.c", line 84: Need an operator
"squirrelmail_vacation_proxy.c", line 85: Need an operator
"squirrelmail_vacation_proxy.c", line 90: Missing dependency operator
"squirrelmail_vacation_proxy.c", line 91: Need an operator
"squirrelmail_vacation_proxy.c", line 92: Need an operator
"squirrelmail_vacation_proxy.c", line 93: Need an operator
"squirrelmail_vacation_proxy.c", line 94: Need an operator
"squirrelmail_vacation_proxy.c", line 330: Need an operator
make: fatal errors encountered -- cannot continue

and here are part of the contents of the squirrelmail_vacation_proxy.c:

/*
 * squirrelmail_vacation_proxy.c
 *
 * Accesses local files in a user's home directory
 *
 * Instalation:
 *      Should be owned by root and suid root.
 *      If RESTRICTUSE was enabled at compile time then the executing user
 *      (real user) must have the same uid as the user defined by WEBUSER
 *      If NOROOT was enabled at compile time then this program may not be
 *      executed on behalf of the root user
 *
 * Actions:
 *              list get put delete
 *
 * Syntax:      squirrelmail_vacation_proxy  server user password action source destination
 */

.define BUFSIZE 512
.define MAXEMAILADRESSES 40
.define FIELDS  5

.include <sys/types.h>
.include <sys/stat.h>
.include <sys/wait.h>
.include <unistd.h>
.include <fcntl.h>
.include <syslog.h>
.include <stdlib.h>
.include <stdio.h>
.include <strings.h>
.include <pwd.h>
.include <string.h>

.include <errno.h>

.include <crypt.h>

.ifdef USESHADOW
.include <shadow.h>
.endif

.define SERVER  1
.define USER    2
.define PSWD    3
.define ACTION  4
.define SRC     5
.define DEST    6

char    *actions[] = {
        "list",
        "get",
        "put",
        "delete",
        0
};


 int my_system (const char *command, char **envp) {

 int pid, status;

           if (command == 0)
               return 1;
           pid = fork();
           if (pid == -1)
               return -1;
           if (pid == 0) {
               char *argv[4];
               argv[0] = "sh";
               argv[1] = "-c";
               argv[2] = command;
               argv[3] = 0;
               execve("/bin/sh", argv, envp);
               exit(127);
           }
           do {
               if (waitpid(pid, &status, 0) == -1) {
                   if (errno != EINTR)
                       return -1;
               } else
                   return status;
           } while(1);
       }




main (argc, argv, envp)
int argc;
char *argv[];
char *envp[];
{
         char line[BUFSIZE];
         char *puid, *testpwd;
         char *pemail[FIELDS];
         unsigned int noemail = 0;
         struct passwd *pw, *getpwnam();
#ifdef USESHADOW

I have had to change the hash marks (#) to periods (.) which I have done at the top and I will do it for the rest of the file but what am I missing. It is obviously not liking anything at the top and can't even find the include files. I have tried to change the /***/ comments to # at the beginning of each line which did nothing for the error messages.  Please forgive me this is making me nuts! I am starting to wonder if it is a different file in the directory altogether. I am running FreeBSD 7.0 and I think this program must have been written for a different UNIX.  If so is there a simple way to convert it?
0
 
LVL 34

Expert Comment

by:Duncan Roe
Comment Utility
C language wants #define not .define. What compiler is make using? If you could post the entire make output as a file attachment and possibly the C file as an attachment also then I might see what's going wrong. C also wants /* ... */ comments - # comments are for shell commands and other scripting languages (and make).
0
 

Author Comment

by:khapbc
Comment Utility
The file originally had #define & #include but when it started complaining I looked it up on the internet found the .define as a solution.  I have changed it back as well as found I spelled include "inclide" in my Makefile.  I have now rerun make and there are very few errors but I don't know how to fix these either:

my# make
cc -c -g  -D USESHADOW -D NOROOT  -D WEBUSER=\"apache\" squirrelmail_vacation_proxy.c
squirrelmail_vacation_proxy.c:39:18: error: crypt.: No such file or directory
squirrelmail_vacation_proxy.c:42:20: error: shadow.h: No such file or directory
squirrelmail_vacation_proxy.c: In function 'my_system':
squirrelmail_vacation_proxy.c:73: warning: assignment discards qualifiers from pointer target type
squirrelmail_vacation_proxy.c: In function 'main':
squirrelmail_vacation_proxy.c:192: error: dereferencing pointer to incomplete type
squirrelmail_vacation_proxy.c:193: error: dereferencing pointer to incomplete type
*** Error code 1

Stop in /var/www/html/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary.

I have attached a copy of Make as well as the c file.

Here are the contents of Makefile:


.include "config.mk"


OBJECTS = squirrelmail_vacation_proxy.o
LIBS = $(LCRYPT)

squirrelmail_vacation_proxy: $(OBJECTS)
        cc -o squirrelmail_vacation_proxy $(LFLAGS) $(OBJECTS) $(LIBS)

install: squirrelmail_vacation_proxy
        install -g root -o root -m 4755 squirrelmail_vacation_proxy $(BINDIR)

clean:
        rm -f *.o *~* core squirrelmail_vacation_proxy

squirrelmail_vacation_proxy.o: squirrelmail_vacation_proxy.c
        cc -c $(CFLAGS) $(DEBUG) $(USESHADOW) $(NOROOT) $(RESTRICTUSE) -D WEBUSER=\"$(WEBUSER)\" squirrelmail_vacation_proxy.c

And the contents of config.mk:


# This is the configuration file for squirrelmail_vacation_proxy
#



# The binary could be installed in /usr/local/sbin
# Change this to fit with your system and remember
# that it must match the $mail_vacation_binary
# setting in config.php in the parent directory
#
#BINDIR = /usr/local/sbin
BINDIR = ..



# Webserver user
# This is the only user that should be allowed to run the
# squirrelmail_vacation_proxy program.
#
WEBUSER = apache



# To disable the WEBUSER check just comment out the
# following line
#
#RESTRICTUSE = -D RESTRICTUSE



# To disallow use of this plugin for the root user,
# uncomment the following line
#
NOROOT = -D NOROOT



# To use the shadow password database file,
# uncomment the following line
#
USESHADOW = -D USESHADOW



# Only uncomment this to debug problems with
# the plugin
#
#DEBUG = -D DEBUG



# If your system complains about an "undefined reference to `crypt'"
# or similar, uncomment the following line

#LCRYPT = -lcrypt



## Compile time flags
#
LIBDIR =
CFLAGS = -g
LFLAGS = -g
CCM = cc -Em


Thank you so much for your help so far!!!!!!!!!!!
Make.txt
squirrelmail-vacation-proxy.c
0
 

Author Comment

by:khapbc
Comment Utility
I googled my problem and found someone who commented out the crypt.h and shadow.h and it now COMPILED!!!!!! Yay!  Hopefully it won't be affected once I get this installed.  Now i have a new issue but I think this one is minor:


my# make install
install -g root -o root -m 4755 squirrelmail_vacation_proxy ..
install: root: Invalid argument
*** Error code 67

Stop in /var/www/html/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary.

Because I am running FreeBSD I read that it might want user wheel instead to issue the make install.  How do I switch to user wheel to install it rather than be root?  wheel is listed as part of the root group on our server.  However the person that set up this server has passed away and I am not sure I will have a password for it?
0
 
LVL 34

Expert Comment

by:Duncan Roe
Comment Utility
Log in as root and enter groups to see what groups root has. Edit -g root in the Makefile above to -g wheel if the output from groups showed wheel, otherwise change to some group that did show.
Be careful to preserve tab characters when editing the Makefile.
0
 

Author Comment

by:khapbc
Comment Utility
Ok so I tried to wheel and I got the same error as root.  So I changed it to apache and it worked.  I have done everything the install and readme says but when I go into roundcube webmail and click on the vacation tab I still get the original error I have had since day 1:

Vacation plugin: /usr/bin/squirrelmail_vacation_proxy cannot be executed by user 'root'
Please read the INSTALL instructions!

Here are the permissions set in the roundcube /plugins/vacation folder:


-rw-rw-rw-  1 root    webapps    64 Feb 20  2010 .htaccess
-rw-rw-rw-  1 root    webapps  5897 Jun 13  2010 Changelog
-rw-rw-rw-  1 root    webapps  5641 Jun 13  2010 INSTALL.TXT
-rw-rw-rw-  1 root    webapps  9249 Mar  7  2010 README.txt
-r--------  1 apache  webapps   580 Apr 13 13:40 config.ini
-rw-rw-rw-  1 root    webapps   180 Feb 28  2010 default.txt
drwxrwxrwx  4 root    webapps   512 Apr 13 13:54 extra
drwxrwxrwx  2 root    webapps   512 Mar  5  2010 lib
drwxrwxrwx  2 root    webapps   512 Apr 15  2010 localization
drwxrwxrwx  3 root    webapps   512 Jun 13  2010 nbproject
drwxrwxrwx  3 root    webapps   512 Jan 23  2010 skins
-rw-rw-rw-  1 root    webapps  1363 Feb 28  2010 vacation.js
-rw-rw-rw-  1 root    webapps  7966 Apr  6  2010 vacation.php

the extra directory:

-rwsr-xr-x  1 apache  apache   14157 Apr 13 13:54 squirrelmail_vacation_proxy
drwxrwxrwx  2 root    webapps    512 Apr 11 00:06 vacation_binary
drwxrwxrwx  2 root    webapps    512 Feb 27  2010 virtual_vacation

and the vacation_binary directory where I just issued the make install:

-rw-rw-rw-  1 root  webapps    541 Apr 13 13:54 Makefile
-rw-rw-rw-  1 root  webapps   1059 Apr 13 13:45 config.mk
-rwxr-xr-x  1 root  webapps  14157 Apr 11 00:06 squirrelmail_vacation_proxy
-rw-rw-rw-  1 root  webapps   7734 Apr 11 00:02 squirrelmail_vacation_proxy.c
-rw-r--r--  1 root  webapps  10544 Apr 11 00:04 squirrelmail_vacation_proxy.o

Here are the installation instructions:

Installation procedure
----------------------
1) Unzip vacation.tar.gz in plugins/
2) Enable the vacation plugin in config/main.inc.php: $rcmail_config['plugins'] = array('vacation');
3) Open plugins/vacation/config.ini in your editor and change the settings if needed.
4) chown $apache_user plugins/vacation/config.ini
5) chmod 0400 plugins/vacation/config.ini

[*** Setuid Driver ***]
- executable = "/usr/bin/squirrelmail_vacation_proxy"
Path to the actual setuid binary that read/writes the .forward file in a user's $HOME directory. Required.

- disable_forward = False
If set to True, the end-user will not be able to set forwards. Defaults to false. Optional.

and the README.TXT:

Available drivers
------------------
The following drivers are available to do the low level work:
- Sieve. This driver uses ManagedSieve to set/get the Sieve script for sending mail.
- FTP. This driver uploads the .forward file to the user's homedirectory.
- SSHFTP. This driver uses SSH to upload .forward file to the user's homedirectory.
- Setuid. This driver places the .forward file in the user's homedirectory using
the squirrel setuid binary.
- SQL. This driver creates entries in the vacation table in a MySQL database and
modifies the alias table.
At the moment the SQL driver is tailored towards Postfix with either MySQL or PostgreSQL
 but can be modified to suit other configurations.
- None. This driver disables the Vacation tab for hosts that do not support Out of office replies.


Setuid Driver
-------------
The setuid backend uses a setuid binary to read/write .forward,.vacation.msg
files for the current logged in user.
Apache executes the setuid binary and passes the user credentials as parameters.

The extra/vacation_binary/ directory of the plugin contains the setuid binary and its source code.
To install this driver, change directory to $path/to/extra/vacation_binary and
issue with root priviliges the command: "make install".

This command install "squirrel_vacation_proxy" to /usr/bin with the setuid bit set.
This directory can be changed in config.mk

Apart from the way it reads/writes files, it behaves like the FTP driver.

Requirements for using this driver:
- The Apache user needs to be 'apache' or you need to edit config.mk
and recompile squirrelmail_vacation_proxy using 'make'.

Requirement for using .forward files
------------------------------------
The SSHFTP, FTP and setuid backend all use .forward files.
See config.ini for available options, like enabling identities, keeping copies etc.

If you want to use one of these drivers, please note:
- The /usr/bin/binary must create .vacation.db when it is missing.
- Upgrade to vacation 1.2.7.0 as earlier versions have a bug that cause vacation to crash when
  .vacation.db is missing.

I am beyond frustrated! Thanks again for your help : )
configini.txt
0
 
LVL 34

Expert Comment

by:Duncan Roe
Comment Utility
I only meant for you to change the group in the Makefile - sorry if that wasn't clear. The user has to be root - that's the whole point of being setuid.
As root, try this:
chown  root:webapps /usr/bin/squirrelmail_vacation_proxy
chmod u+s /usr/bin/squirrelmail_vacation_proxy

Open in new window

(the chmod is because I suspect chown  will clear the setuid bit).
After that, it should "just work".
0
 

Author Comment

by:khapbc
Comment Utility
Sorry for my delayed response.  I just had to leave it alone for a while : )
As per your last instructions I have done that and I am still getting the following error:

Vacation plugin: /usr/bin/squirrelmail_vacation_proxy is not configured for user "root".
Check config.mk in plugins/vacation/extra/vacation_binary.
Please read the INSTALL instructions!

Before your last instructions I checked the /usr/bin and the squirrelmail_vacation_proxy file did not show up but it does now.  I had to edit the /usr/bin location in config.mk too as I didn't have it set which is why it shows up now I think.  When I make a change to the config.mk file and reissue make, and then make install it says its up to date?  How could that be if I just changed it?  Or should I rm the /usr/bin/squirrelmail_vacation_proxy file each time?

Here is my config.mk

# This is the configuration file for squirrelmail_vacation_proxy
#



# The binary could be installed in /usr/local/sbin
# Change this to fit with your system and remember
# that it must match the $mail_vacation_binary
# setting in config.php in the parent directory
#
#BINDIR = /usr/local/sbin
BINDIR = /usr/bin



# Webserver user
# This is the only user that should be allowed to run the
# squirrelmail_vacation_proxy program.
#
WEBUSER = wheel



# To disable the WEBUSER check just comment out the
# following line
#
#RESTRICTUSE = -D RESTRICTUSE



# To disallow use of this plugin for the root user,
# uncomment the following line
#
NOROOT = -D NOROOT



# To use the shadow password database file,
# uncomment the following line
#
/*USESHADOW = -D USESHADOW*/



# Only uncomment this to debug problems with
# the plugin
#
#DEBUG = -D DEBUG



# If your system complains about an "undefined reference to `crypt'"
# or similar, uncomment the following line

LCRYPT = -lcrypt



## Compile time flags
#
LIBDIR =
CFLAGS = -g
LFLAGS = -g
CCM = cc -Em

Does anything look wrong in there?  I have uncommented places and then put them back when nothing seemed to change.

Is it possible it just won't work with the setuid driver?  I am wondering that but also thinking it should give me a different error message if that were the case.

I am nearly about to throw my hands in the air!  Do you know of a reputable company (or you...not sure if you experts do that or not) that could fix this for me at a reasonable cost?  I am thinking it should only take someone an hour that knows what they are doing?

Thanks Again
0
 
LVL 34

Expert Comment

by:Duncan Roe
Comment Utility
WEBUSER = wheel looks suspicious to me because wheel is usually only a group and not a user. cat /etc/passswd will show you whether wheel is in fact a user. I suspect you might want WEBUSER = apache.
I'm surprised that squirrelmail_vacation_proxy is not now working. I wonder if perhaps it's installed in multiple places. Several approaches to determining if this is the case
type -a squirrelmail_vacation_proxy
locate squirrelmail_vacation_proxy
find / -name squirrelmail_vacation_proxy

Open in new window

Run all these as root. You only need to try find if you get an error when trying locate (such as it's not installed or the database is old). If you find occurrences outside of the build directory apart from /usr/bin, delete them and try using the plugin again.
Also please post output of ls -l /usr/bin/squirrelmail_vacation_proxy
0
 

Author Comment

by:khapbc
Comment Utility
Output of locate squirrelmail_vacation_proxy

/usr/bin/squirrelmail_vacation_proxy
/var/www/html/kristin_roundcubemail_backup_04042012/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary/squirrelmail_vacation_proxy
/var/www/html/kristin_roundcubemail_backup_04042012/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary/squirrelmail_vacation_proxy.c
/var/www/html/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary/squirrelmail_vacation_proxy
/var/www/html/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary/squirrelmail_vacation_proxy.c
/var/www/html/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary/squirrelmail_vacation_proxy.o

That part looks ok?  Looks to me like its only in one place.  Yesterday I did change the file from WEBUSER = apache to WEBUSER = wheel to see if that worked.  You are correct, wheel does not show up my etc/passwd file.

apache and webapps show up in etc/passwd file:

apache:*:1004:1002:User &:/var/www/apache:/bin/sh
webapps:*:1005:1003:User &:var/www/html/webapps:/bin/sh

When I run ls -l /usr/bin/squirrelmail_vacation proxy I get this:

-rwsr-xr-x  1 root  wheel  14157 Apr 17 23:13 /usr/bin/squirrelmail_vacation_proxy

I also changed your chown root:webapps yesterday to chown root:wheel after it didn't work.

I think maybe I should go back to the beginning and make all the ownerships/permissions correct.

I would need to start with the Makefile which has this line which I also changed yesterday:

install: squirrelmail_vacation_proxy
        install -g wheel -o root -m 4755 squirrelmail_vacation_proxy $(BINDIR)

This is what the original file had:

install: squirrelmail_vacation_proxy
      install -g root -o root -m 4755 squirrelmail_vacation_proxy $(BINDIR)

Then config.mk...the original file had this line which I have since changed to apache and then wheel:

# Webserver user
# This is the only user that should be allowed to run the
# squirrelmail_vacation_proxy program.
#
WEBUSER = www-data

When I had it as apache I just had it WEBUSER = apache

Here are my file/directory permissions for the files in vacation_binary:

-rw-rw-rw-  1 root  webapps    538 Apr 17 22:55 Makefile
-rw-rw-rw-  1 root  webapps   1065 Apr 17 23:16 config.mk
-rwxr-xr-x  1 root  webapps  14157 Apr 11 00:06 squirrelmail_vacation_proxy
-rw-rw-rw-  1 root  webapps   7734 Apr 11 00:02 squirrelmail_vacation_proxy.c
-rw-r--r--  1 root  webapps  10544 Apr 11 00:04 squirrelmail_vacation_proxy.o

My plugins/vacation directory:

-rw-rw-rw-  1 root    webapps    64 Feb 20  2010 .htaccess
-rw-rw-rw-  1 root    webapps  5897 Jun 13  2010 Changelog
-rw-rw-rw-  1 root    webapps  5641 Jun 13  2010 INSTALL.TXT
-rw-rw-rw-  1 root    webapps  9249 Mar  7  2010 README.txt
-r--------  1 apache  webapps   580 Apr 13 13:40 config.ini
-rw-rw-rw-  1 root    webapps   180 Feb 28  2010 default.txt
drwxrwxrwx  4 root    webapps   512 Apr 13 17:15 extra
drwxrwxrwx  2 root    webapps   512 Mar  5  2010 lib
drwxrwxrwx  2 root    webapps   512 Apr 15  2010 localization
drwxrwxrwx  3 root    webapps   512 Jun 13  2010 nbproject
drwxrwxrwx  3 root    webapps   512 Jan 23  2010 skins
-rw-rw-rw-  1 root    webapps  1363 Feb 28  2010 vacation.js
-rw-rw-rw-  1 root    webapps  7966 Apr  6  2010 vacation.php

And of course my /usr/bin/squirrelmail_vacation_proxy as displayed above:

-rwsr-xr-x  1 root  wheel  14157 Apr 17 23:13 /usr/bin/squirrelmail_vacation_proxy

I AM NOT GOING TO CHANGE ANYTHING this time until I here from you again!  Thanks so much...
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 34

Expert Comment

by:Duncan Roe
Comment Utility
Looks to me like its only in one place. I see
/usr/bin/squirrelmail_vacation_proxy
/var/www/html/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary/squirrelmail_vacation_proxy
/var/www/html/kristin_roundcubemail_backup_04042012/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary/squirrelmail_vacation_proxy

Open in new window

The one in backup doesn't worry me, but quite possibly the plugin uses the one in vacation_binary, which is after all under plugins. As root, either
cd /var/www/html/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary
rm squirrelmail_vacation_proxy
ln -s /usr/bin/squirrelmail_vacation_proxy

Open in new window

Or
cd /var/www/html/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary
chmod go-w squirrelmail_vacation_proxy
chmod u+s squirrelmail_vacation_proxy

Open in new window

(squirrelmail_vacation_proxy is already owned by root).
0
 

Author Comment

by:khapbc
Comment Utility
Sorry, above I was ignoring the backup and totally missed that it was in the vacation_binary directory and wasn't one of .c or .o files.

So I ran the first 3 commands you said:

cd /var/www/html/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary
rm squirrelmail_vacation_proxy
ln -s /usr/bin/squirrelmail_vacation_proxy

and now when I run ls -l from in here:
/var/www/html/roundcubemail-0.5.4/plugins/vacation/extra/vacation_binary

I get this:

-rw-rw-rw-  1 root  webapps    538 Apr 17 22:55 Makefile
-rw-rw-rw-  1 root  webapps   1065 Apr 20 10:59 config.mk
lrwxr-xr-x  1 root  webapps     36 Apr 20 10:51 squirrelmail_vacation_proxy -> /usr/bin/squirrelmail_vacation_proxy
-rw-rw-rw-  1 root  webapps   7734 Apr 11 00:02 squirrelmail_vacation_proxy.c
-rw-r--r--  1 root  webapps  10544 Apr 11 00:04 squirrelmail_vacation_proxy.o


And I am still left with this error?

Vacation plugin: /usr/bin/squirrelmail_vacation_proxy is not configured for user "root".
Check config.mk in plugins/vacation/extra/vacation_binary.
Please read the INSTALL instructions!

Is there something wrong in my config.mk file? Could I have the wrong /usr/bin directory?Or should I start over with a fresh install of this plugin?

Thanks
0
 
LVL 34

Expert Comment

by:Duncan Roe
Comment Utility
I am still left with this error That's a mystery to me too.
I thought the error message was generated because the setuid program wasn't setuid. As such, it wasn't an especially appropriate message (it's not a standard system error message - that's why I say it was generated). However, maybe it's trying to tell us something else that we've been ignoring.
The route I would take is to try to get the existing installation to work, rather than re-configuring and building again. Are you trying to send mail as root? Do you have an appropriate .forward file in root's home directory? (usually /root). Can non-root users read that file? (Check permissions of /root and /root/.forward).
If that's all OK, next thing is to find the error message in the source code and look at the reason why it is output.
0
 

Author Comment

by:khapbc
Comment Utility
I am logging into webmail as me (not root) and when I click on the vacation tab that is where I get the error message.

There is no .forward file in directory /root

I did a locate .forward and nothing came up at all.

Permissions of /root directory

drwxr-xr-x   5 root  wheel       512 Mar 14 21:37 root
0
 
LVL 34

Expert Comment

by:Duncan Roe
Comment Utility
The system will not work without .forward files - as per the README that you posted inthe original Q. Put one in your home directory as README describes. If no luck, put one in /root.
Post results - if still no joy do you feel happy to peruse the source code or would yu like me to have a look?
0
 

Author Comment

by:khapbc
Comment Utility
Sorry for my delayed response.  I have been trying to understand the setup on this server.  Basically what I have found it that there are no .forward files.  The server has users setup as virtual users, they do not have their own home directory.  Will this even work with virtual users and virtual domains?

Oh and I forgot to add, the error is comeing from the source code where it is trying to download the .forward file from the home directory.

Thanks
0
 
LVL 34

Expert Comment

by:Duncan Roe
Comment Utility
Yes I thought it might be. I would say, if there are no home directories then this is not going to work. Not as it is, anyway.
Could you modify the code to fetch .forward from somewhere else that would fit in with your setup? I mean obviously you can, since this is Free Open Source Software - the problem is to design a scheme such that each user's preferred forward destination can be located by the software.
0
 

Author Comment

by:khapbc
Comment Utility
In the plugins INSTALL & README files there is a Virtual/SQL driver that is tailored towards postfix.  Do you have any idea wether postfix or exim work similarly?  

In the meantime, I will look at the code in regards to fetching the .forward file.  I am also actively searching google to see if I can find someone who has set this up with exim and virtual users, currently to no avail. Once again, thanks for your help : )
0
 
LVL 34

Expert Comment

by:Duncan Roe
Comment Utility
Not familiar with postfix / exim, sorry
0
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points
Comment Utility
Put a .forward file in /root. See if you get further.
What I suspect is happening here is that no user identification information is getting to the plugin. So it acts for user 0 (root). Root always has a home directory.
The test will prove whether your setup is working as intended by its authors.
0
 

Author Comment

by:khapbc
Comment Utility
Thanks for all of your help on this.  I put the .forward file in and no luck...I still got the error:


Vacation plugin: /usr/bin/squirrelmail_vacation_proxy is not configured for user "root".
Check config.mk in plugins/vacation/extra/vacation_binary.
Please read the INSTALL instructions!

I am still looking into making it work for virtual users for exim but I am giving up on this setuid driver.

Thanks Again
0

Featured Post

Wish Marketing would stop bothering you?

Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

Join & Write a Comment

Automapping, a wonderful feature with Exchange 2010 (SP2 onwards I believe), allows additional/Shared mailboxes that a user has access to be automatically mapped on Outlook client, simplifying the process by adding them while Outlook launches. Ho…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now