Preference file*.pref could not be opened

zwerfkat

Verified User
Joined
Sep 23, 2011
Messages
15
Recently, I installed suPHP cgi on my VPS (CentOS 5.7) following these instructions:
http://help.directadmin.com/item.php?id=197

Now when I restore a user backup (as admin), I get the following error when opening one of the mailboxes from the restored domain with squirrelmail:

"Preference file, /var/www/html/squirrelmail/data/[email protected], could not be opened. Contact your system administrator to resolve this issue."

Looking more closely, the group owners are set incorrectly to:

-rw------- 1 apache webapps 198 Dec 21 11:44 [email protected]

When I set the group owners to webapps:webapps it is working again. Also, when I run from custombuild:

./build squirrelmail


the ownership is corrected for the *.pref files. But as soon as I restore a backup, the problem returns.

I am a bit worried ownership is not correctly restored by DA. Not sure if only squirrelmail is effected by this...

Anyway, something additional I need to do after having installed suPHP?
 
Hello,

I would suspect a DA restore bug, but not yet sure.
I'll add an entry to the versions system for investigation.

John
 
Same problem

Admin restored user gets error message when trying to login to squirrelMail

Preference file, /var/www/html/squirrelmail/data/[email protected], could not be opened.

DirectAdmin 1.38.4
 
Your permissions are wrong then.

Code:
chown -R webapps:webapps /var/www/html
 
I'm running into a similar problem.

When I log into a server by it's hostname, I can log in with correct username/password combination.

But when I log into the same server by the domain name, and try the same correct username/password combination, I get the following error:
Code:
ERROR
Error opening ../data/default_pref
Default preference file not found or not readable!
Please contact your system administrator and report this error.
Any ideas?

Jeff
 
Hmm... our SM setup refer to hostname values much.
If one works, but another doesn't, my first guess is that they're resolving to different places.
Ensure they both go to the same IP (or at least confirm they're both going to the same box)

The other though, although shouldn't be relevant, is that domains have their own VirtualHosts, but the hostname or an IP does not.
There may be restrictions or differences in the domains VH which may be causing that, eg: different user, etc..
But our setup *should* be isolating the changes for the domain with the <Directory /home/user/domains..> tag.... just something else to check.

Service in /var/www/html should be using webapps for suPhp, and grouped to apache if CLI.
See what the permissions are on the path in question.

John
 
@DirectAdmin Support:

Thanks, John. I hope to have time to investigate further using your reply as a starting point, today.

Everyone:

Has anyone else seen this problem?

Thanks.

Jeff
 
Jeff,

I had the same issue. You need to add to /etc/httpd/conf/extra/httpd-alias.conf the following so that mod_ruid permissions are correct as it will try to access it as the user when in fact the permissions are set to webapps.

<location /phpMyAdmin>
RMode config
RUidGid webapps webapps
RGroups apache
</location>
<location /phpmyadmin>
RMode config
RUidGid webapps webapps
RGroups apache
</location>
<location /squirrelmail>
RMode config
RUidGid webapps webapps
RGroups apache
</location>
<location /roundcube>
RMode config
RUidGid webapps webapps
RGroups apache
</location>
<location /webmail>
RMode config
RUidGid webapps webapps
RGroups apache
</location>
<location /atmail>
RMode config
RUidGid webapps webapps
RGroups apache
</location>
 
Thanks, Kevin, I believe that will do it. I'll give it a try later this weekend (maybe during halftime tomorrow :)).

Has this been added to the mod_ruid how-to? Did I just miss it somehow? Or does it need to be added?

Thanks, again.

Jeff
 
It was in another thread somewhere. It should be added to the mod_ruid2 thread. The other issue is the restores setting the wrong permissions on squirrelmail data should probably also be added.
 
Back
Top