After installing custombuild 2 permission problems on my server

tleg

Verified User
Joined
Nov 24, 2014
Messages
31
Hello,

I have installed custombuild 2 via ssh to update from php 5.3 to 5.5. After that, i have permission problems on all my sites and most important, my emails stop working. When i want to access squirrelmail i get the following error message:

"Error opening ../data/default_pref
Default preference file not found or not readable!
Please contact your system administrator and report this error."

Another problem i'm not an experienced user, so i want to ask you kindly not to use too difficult terms.

Thanks in advance!
 
What kind of permission problems, can you give some examples?
Is it a fresh custombuild 2 installation?

Is this error from default_pref from squirrelmail? If yes try this:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build squirrelmail

If this does not help, try (if you use Centos):
Code:
touch /var/www/html/squirrelmail/data/default_pref
chown webapps:webapps /var/www/html/squirrelmail/data/default_pref

For the other issues you best can post the errors you are seeing, don't use parts like with the default_pref, use the full error.
 
What kind of permission problems, can you give some examples?
Is it a fresh custombuild 2 installation?

Is this error from default_pref from squirrelmail? If yes try this:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build squirrelmail

If this does not help, try (if you use Centos):
Code:
touch /var/www/html/squirrelmail/data/default_pref
chown webapps:webapps /var/www/html/squirrelmail/data/default_pref

For the other issues you best can post the errors you are seeing, don't use parts like with the default_pref, use the full error.

Hi thanks for your feedback,

Maps that where chmod to 777 were unwritable. I had to reset the ownership on the directories and files in order to rechmod them again. About errors, i don't have any errors.
./build squirrelmail
Code:
cp: `/var/www/html/squirrelmail/data' and `/var/www/html/squirrelmail-1.4.23-20150507_0200/data' are the same file
Setting up SquirrelMail Config
SquirrelMail 1.4.23-20150507_0200 installation is done.

touch /var/www/html/squirrelmail/data/default_pref
chown webapps:webapps /var/www/html/squirrelmail/data/default_pref


This didn't worked, it just jumped to a new line
 
You forgot my first question, is it a fresh CB 2.0 installation? Or did you have CB 1.x before or no custombuild at all?
Since there are the rights questions, did you enable su-php during installation of your CB2? This could explain the problem with writing to 777 chmod directory's.
You can also see it at the first 3 lines of your options.conf file:
#PHP Settings
php1_release=5.5
php1_mode=mod_php
php2_release=no

After a conversion, it could be you need to rebuild several things.
In my case I just checked options.conf and set it as I wanted and then used:
./build update
./build clean
./build all d
And all worked fine.

This didn't worked, it just jumped to a new line
How did it not work? Did the command just jumped to a new line without changing owner of the default_pref or was owner changed and file present but did it it gave the same error?
If it's the same error, try this.
chown webapps:webapps /var/www/html -R

It looks a bit as something gone wrong during a CB1>CB2 conversion.
 
Dear Richard,

Sorry i forget your question. Yes it's about a clean first installation of CB2. Never installed it, reason? To update php version.

I managed to fix my mail issue. I reset the settings to default under DNS ADMINISTRATION at DirectAdmin.

How did it not work?
It jumped to a new command line(no messages).

No matter the mail issue has been solved i need to check everything else has been set correctly(which i doubt). For example Squirrelmail and Roundcube stopped working too.

Where can i find options.conf? I can't find it in the editor at DirectAdmin.
 
Hello tleg.

Best way to avoid problems is indeed first do an install with php 5.3 and if everything is working, then upgrade to 5.5.
Good to know that something was wrong in DNS administration, seems this your domain settings checking, maybe with intodns.com?

Where can i find options.conf? I can't find it in the editor at DirectAdmin.
You best can do it via SSH.
It can be found in /usr/local/directadmin/custombuild so best you can do is:
Code:
cd /usr/local/directadmin/custombuild[/quote]
And then edit options.conf with nano or vim editor.
 
Hello tleg.

Best way to avoid problems is indeed first do an install with php 5.3 and if everything is working, then upgrade to 5.5.
Good to know that something was wrong in DNS administration, seems this your domain settings checking, maybe with intodns.com?


You best can do it via SSH.
It can be found in /usr/local/directadmin/custombuild so best you can do is:
Code:
cd /usr/local/directadmin/custombuild[/quote]
And then edit options.conf with nano or vim editor.[/QUOTE]

How do i open opions.conf with nano through SSH?
 
Code:
cd /usr/local/directadmin/custombuild
nano -w options.conf
When you're ready, use Ctrl-X to close and type Y to save changes.
However, if you're known with the vim editor, that can be used too.
 
Hi thanks,

Here is the output:

Code:
#PHP Settings
php1_release=5.5
php1_mode=mod_php
php2_release=no
php2_mode=php-fpm
opcache=no
htscanner=no
php_ini=no
php_timezone=Europe/Amsterdam
php_ini_type=production
ioncube=no
zend=no
suhosin=no
x_mail_header=yes

#MySQL Settings
mysql=5.6
mariadb=10.0
mysql_inst=no
mysql_backup=yes
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
mysql_force_compile=no

#WEB Server Settings
webserver=apache
litespeed_serialno=trial
modsecurity=no
modsecurity_ruleset=comodo
apache_ver=2.4
apache_mpm=auto
mod_ruid2=yes
userdir_access=yes
harden_symlinks_patch=yes
use_hostname_for_alias=no
redirect_host=vps1.**********.com
redirect_host_https=no

#WEB Applications Settings
phpmyadmin=yes
phpmyadmin_ver=4
squirrelmail=yes
roundcube=yes
webapps_inbox_prefix=no

#ClamAV-related Settings
clamav=no
clamav_exim=yes
modsecurity_uploadscan=no
proftpd_uploadscan=no
pureftpd_uploadscan=no
suhosin_php_uploadscan=no

#Mail Settings
exim=no
eximconf=no
eximconf_release=4.4
blockcracking=no
easy_spam_fighter=no
 
Some advise:
mysql_inst=no -> I would set this to yes if you use mysql.
exim=no -> change to yes, you want to have and update exim.

You might also change the exim.conf to yes later on, because the spamblocker 4.x exim.conf files protect you way better then the default 2.1 configuration.
 
I had put the two exim rules back to OFF again, i stopped receiving mails when i set it on. Any advice?
 
What 2 exim rules?
You mean the mysql and the exim statement in options.conf? That can in no way affect the working of email, has only to do with the build process.

Did you run the rest of the commands after changing options.conf?
./build update
./build clean
./build all d

with both the options I mentioned set to yes?
 
Hi,

Yes, since i put them on Yes and reboot the mails stopped working. When i put it back off the mails work again.

exim=no
eximconf=no


Did you run the rest of the commands after changing options.conf?
./build update
./build clean
./build all d

No i didn't, should i try it again?
 
No i didn't, should i try it again?
Yes ofcourse. Put them both first to yes (the exim stuff) and save the file.
Then run those 3 commands.

This will completely rebuild your Directadmin, including exim and the spamblocker 4.x configuration. And php 5.6 and mysql if you enabled them too like stated. If you want to have mysql 5.5, first change 5.6 to 5.5 in options.conf
You should have a well working DA afterwards.
No reboot necessary.
 
Installation complete. Mails still working, but squirrelmail and roundcube still not working.

I forgot to do this "If you want to have mysql 5.5, first change 5.6 to 5.5 in options.conf"
 
Last edited:
Installation complete. Mails still working, but squirrelmail and roundcube still not working.

I forgot to do this "If you want to have mysql 5.5, first change 5.6 to 5.5 in options.conf"

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

Squirrelmail
Error opening ../data/default_pref
Default preference file not found or not readable!
Please contact your system administrator and report this error.
 
Be sure to run all commands as root.
I forgot to do this "If you want to have mysql 5.5, first change 5.6 to 5.5 in options.conf"
You can downgrade, but I'm not 100% sure if that will effect the already upgraded databases.
If you have backups of the accounts databases, you can change this setting in options.conf and then do:
Code:
./build update
./build clean
./build mysql
and then you have mysql 5.5. Restore back-upped databases if needed.
If you want to do this, do it before you start working on the webmail solution below.

However you still have the webmail issues.
The only thing I can think of is that you remove roundcube and squirrelmail and build them again seperately and watch if you see errors.
Like this:
Code:
cd /var/www/html
rm -rf roundcube
rm -rf roundcubemail-1.1.4
Change the version if you have not version 1.1.4, do the same with the squirrelmail directory's.

Then further with this:
Code:
chown webapps:webapps /var/www/html -R
cd /usr/local/directadmin/custombuild
rm roundcubemail-1.1.4.tar.gz
rm squirrelmail-1.4.22-20140402_0200.tar.gz
check if the versions are correct.

After that, first build roundcube:
Code:
./build update
./build clean
./build roundcube
Check during build if you encounter any errors during build and post them here.

If this works well, do the same with squirrelmail:
Code:
./build clean
./build squirrelmail
and check if you see any build errors there and post them here.

Probably we can see what is going wrong then, if still something is going wrong.
 
WHen i use this, nothing happen. I get a new command rule.

Code:
cd /var/www/html
rm -rf roundcube
rm -rf roundcubemail-1.1.4
 
I'm just wondering a bit if you are used to work in console.
Because it's rather logical that you won't see anything happen but just get a new command rule.
You can check with this:
Code:
ls -la /var/www/html
and you will see that roundcube is gone if everything is correct.

I do expect you to go and look in those directory's if you issue these kind of commands and if I advise to change the version number if needed in your case.
 
No i have little to no knowledge to work in console. I try to Google things up what you said to see i can figure it out myself to prevent wasting your time on my problem (it seems i failed).
I'm going to do "ls -la /var/www/html" tomorrow, i have a nose leaking like a waterfall (Flu)

I want to thank you for all your time, i really appreciate what you are doing.
 
Back
Top