webmail not working after CB1->cb2 upgrade

Richard G

Verified User
Joined
Jul 6, 2008
Messages
13,500
Location
Maastricht
Upgraded from CB 1.2 to CB2.0 and now webmail is not working.
Some other things were not working so I deleted all http.conf files, did a ./build apache and guess what... I got a not adjusted one, even /etc/httpd/conf/extra/aliases statement was not in there.
So I copied a httpd.conf from my other server which had CB 2.0 installed from scratch.

Still my webmail is not working, givig this error:
CONFIGURATION ERROR

config.inc.php was not found.
Please read the INSTALL instructions!

I already did a ./build roundcube (did not help)
I even removed the complete /var/www/html/roundcube*
then again ./build roundcube and it was build again, but still the same error.
Versions.txt says it's version 1.03 so thats the same as the others.

I wonder why I even started to upgrade to CB 2.0. :(

Also I'm missing something in the procedure:
Code:
cd /usr/local/directadmin
mv custombuild custombuild_1.x
wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild
The httpd.conf is not updated, neither are some other things.
What's coming after this? Must I do:

Code:
./build
./build all d
Or something?
 
Last edited:
To solve the issue you should add this

Code:
<Directory /var/www/html>
    <IfModule !mod_ruid2.c>
        SuexecUserGroup webapps webapps
    </IfModule>
</Directory>


into /etc/httpd/conf/extra/httpd-hostname.conf or /etc/httpd/conf/extra/httpd-includes.conf and restart apache.

The patch mentioned by Martynas seems to be already applied with custombuild.
 
Thank you zEitEr, I thought when running custombuild nothing had to be adjusted anymore?
However, this is already present in my httpd-hostname.conf:
Code:
        <IfModule mod_ruid2.c>
                RUidGid webapps webapps
        </IfModule>
That file looks exactly the same as on my server with CB 2.0 build from scratch.
So webmail is still not working.

@Sellerone:
No I did not mean the patch, it were in fact 2 questions, the second one which says "What's coming after this" is the question how to proceed on converting from cb 1.2 to 2.0 because with the "cd custombuild" you're not done yet, the conversion is not ready and not working at that point.
 
That's

Code:
<IfModule !mod_ruid2.c>
    SuexecUserGroup webapps webapps
</IfModule>


but not

Code:
<IfModule mod_ruid2.c>
    RUidGid webapps webapps
</IfModule>
 
I don't think that is correct.... I've got another server build with CB 2.0 from scratch about 2 weeks ago and it has the same content, like this:
Code:
<Directory /var/www/html>
        Options +SymLinksIfOwnerMatch +IncludesNoExec
        AllowOverride AuthConfig FileInfo Indexes Limit Options=Includes,IncludesNOEXEC,Indexes,ExecCGI,MultiViews,SymLinksIfOwnerMatch,None

        Order allow,deny
        Allow from all
        <IfModule mod_suphp.c>
                suPHP_Engine On
                suPHP_UserGroup webapps webapps
        </IfModule>
        <IfModule mod_ruid2.c>
                RUidGid webapps webapps
        </IfModule>
        <IfModule mod_lsapi.c>
                lsapi_user_group webapps webapps
        </IfModule>
</Directory>

Just to be sure I just tried what you said, by putting SuexecUserGroup there and restarted httpd, but still the same error. So I put
RUidGid back.
 
Also discovered something else. I installed squirrelmail, but in the /extra directory, the httpd-alias file is not updated with squirrelmail and the webmail_link from directadmin is not working either.
I changed that form roundcube to squirrelmail, but has no effect.

When I put the link manually in there it's working, but this error occurs:
Error opening /var/www/html/squirrelmail/data/default_pref
Could not create initial preference file!
/var/www/html/squirrelmail/data/ should be writable by user mycompany
Please contact your system administrator and report this error.
 
Last edited:
I don't think that is correct.... I've got another server build with CB 2.0 from scratch about 2 weeks ago and it has the same content, like this:
...
Just to be sure I just tried what you said, by putting SuexecUserGroup there and restarted httpd, but still the same error. So I put
RUidGid back.


I did not mean to replace one by another. Make sure to rebuilt apache, this helped me at least.
 
I even did a ./build all d and it has not helped me.
However it looked like the /extra directory was not rebuild. I could be mistaken.
Can I safely delete the extra directory and do a ./build apache again? If yes I might have to try that tonight then because it's a production server, I can't disturb customers now.

I wonder why on one server only the Ruid line is needed and on another server with the exact same configuration Ruid and Suexecroup is needed, that's strange imho.
And adding a second line with SuexecUserGroup webapps webapps does not fix the problem as I just tested.

I just discovered this line in my log.
Code:
PHP Warning:  Error writing to log file /var/www/html/roundcubemail-1.0.3/logs/errors; Please check permissions in /var/www/html/roundcubemail-1.0.3/program/lib/Roundcube/rcube.php on line 1147
Does that help?
 
Sellerone fixed it for me by doing a ./build rewrite confs (thank you Sellerone!).
However I still find it odd that a complate apache rebuild did not even do that rewrite confs or a ./build all d.

So remains the question, upgrading to CB 2.0 from 1.2?
Code:
cd /usr/local/directadmin
mv custombuild custombuild_1.x
wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild

Must this be followed by:
Code:
./build clean
./build all d
to get everything correct, or must I do something else?
 
Probably since an update of apache doesnt require to rewrite all the configuration files that's the reason why rewrite_confs isnt runned automatically

Regards
 
Sellerone fixed it for me by doing a ./build rewrite confs (thank you Sellerone!).
However I still find it odd that a complate apache rebuild did not even do that rewrite confs or a ./build all d.

So remains the question, upgrading to CB 2.0 from 1.2?
Code:
cd /usr/local/directadmin
mv custombuild custombuild_1.x
wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild

Must this be followed by:
Code:
./build clean
./build all d
to get everything correct, or must I do something else?

Please check #2 in http://forum.directadmin.com/showthread.php?t=44743. It's official upgrade instruction. And "./build rewrite_confs" was always there :) It has an answer about "./build all d" too.
 
Anndd as usual Martynas has the answer :)

Also, it's not automatic cause CB doesnt actually "know" that is an update from 1.2 to 2.0 ;)

Regards
 
Should be not needed, except for those software that actually change (ex. apache from 2.2 to 2.4), but, build all would not break anything i presume.

Regards
 
But what do I have to do after cd custombuild then?

Because mod_ruid has to be implemented again, so I have to rebuild apache and php at least, correct?
 
If PHP stay at the same version build php isnt necessary

Regarding apache and mod_ruid2, once edited the options.conf yes, build apache is needed aswell i presume as for build rewrite_confs

Regards
 
I discovered on the current server, that after doing ./build update and ./build update_versions (after adjusting the options.conf) CB 2 is building a lot of things anyway.
I must just remember to do that build rewrite_confs, I'm forgetting that every time.

Thank you very much for all the help and explanation!
 
Back
Top