LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-13-2009, 07:47 AM   #1
carstenson
Member
 
Registered: Oct 2003
Location: Austin, TX
Distribution: RH 7.3, RH 9.0, FC4, Arch
Posts: 36

Rep: Reputation: 15
Problem with squirrelmail login data_dir


I have researched this quite a bit and I guess no one is having this problem. I am creating a new mail server.
  • apache 2.2.11-2
  • php 5.2.8-1
  • squirrelmail 1.4.17-3
When I run configtest.php, I get the error:
Code:
ERROR: Data dir (/var/local/squirrelmail/data/) does not exist!
When I try to login, I get the error:
Code:
Error opening ../data/default_pref
Could not create initial preference file!
/var/local/squirrelmail/data/ should be writable by user httpd
Please contact your system administrator and report this error.
I don't know which of the three packages are causing this problem. I have checked that the data directory exists, and I have tried all sorts of owners/permissions. I suspect that apache or php aren't allowing access outside of apache's root, or possibly expecting this directory chain within the apache root dir.

Thanks for any help.
 
Old 02-13-2009, 08:02 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Apache does not serve pages outside of DocumentRoot, unless you setup an Alias:
Code:
Alias /webmail/ "/var/local/squirrelmail/"
You may also add the default:
Code:
<Directory "/var/local/squirrelmail">
   Order allow,deny
   Allow from all
</Directory>
Regards
 
Old 02-13-2009, 08:20 AM   #3
carstenson
Member
 
Registered: Oct 2003
Location: Austin, TX
Distribution: RH 7.3, RH 9.0, FC4, Arch
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks for the response, bathory. That's what I was suspecting. This data directory is an absolute path, outside of apache. I'm not sure how to apply the alias, since it is not something that users will directly access. It is defined in squirrelmail and just used within that app. The documentation recommends going outside of DocumentRoot, and the package installed with this directory.

I did try several variations of your directory code, without success. I tried your exact code, I tried adding a trailing "/", I added "data" to this, and I added another trailing "/". Any other suggestions.

I will try changing SM's config to be within the DocumentRoot, even though this is not recommended.
 
Old 02-13-2009, 08:36 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Well, reading the documentation it should work.
You didn't mentioned your distro, but seeing at your profile that you use redhat based distros, check to see if it isn't a selinux problem for the /var/local/squirrelmail directory.
 
Old 02-13-2009, 08:46 AM   #5
carstenson
Member
 
Registered: Oct 2003
Location: Austin, TX
Distribution: RH 7.3, RH 9.0, FC4, Arch
Posts: 36

Original Poster
Rep: Reputation: 15
Sorry, I should've mentioned that I am trying out Arch. I am really enjoying the total control that it gives. Much different than RH. I've seen the problems reported with selinux, but that shouldn't apply to me.

My workaround did get me going. I am still interested in solving this, since I am doing what they recommend not to do.

This is my config.php change in squirrelmail. It adds the directories within DocumentRoot.
Code:
$data_dir                 = SM_PATH . 'data/';
$attachment_dir           = SM_PATH . 'attach/';
 
Old 02-13-2009, 09:17 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Are you sure it's not a permissions problem?
What it the output of:
Code:
ls -l /var/local
ls -l /var/local/squirrelmail
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
not able to login in squirrelmail anshumali Linux - Server 12 08-28-2008 09:57 PM
Squirrelmail problem having blank login page sir_oasis214 Linux - Networking 3 03-10-2008 11:26 PM
Squirrelmail login Chiragrs Linux - Networking 1 05-11-2007 02:05 PM
SquirrelMail login problem tomhiggins Linux - Networking 4 07-20-2006 09:09 PM
login problem with squirrelmail tej Linux - Newbie 2 08-18-2004 05:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration