LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-15-2009, 04:40 AM   #1
cojones
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Rep: Reputation: 15
Squirrelmail local login works but not from somewhere else


Hello,

I just installed Squirrelmail and tested it locally (http://localhost/squirrelmail) and it works but when I try to login externally (http://www.example.com/squirrelmail) I get following error messages:
Error opening ../config/default_pref
Could not create initial preference file!
/var/lib/squirrelmail/data/ should be writable by user www-data
Please contact your system administrator and report this error.

Does anyone know why this could be? Permissions are set correctly cause it's working locally...
 
Old 09-15-2009, 05: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
Does /var/lib/squirrelmail/data/ default_pref exist?
 
Old 09-15-2009, 05:41 AM   #3
cojones
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 15
No and I think it doesn't need to be there cause the pref file for my account was correctly created when I logged in locally and it's in that directory. I copied it there anyway to try but no change, same error.
 
Old 09-15-2009, 06:06 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
Use the squirrelmail configtest (http://localhost/squirrelmail/src/configtest.php) to see if you find any problem.
And double check the permissions in /var/lib/squirrelmail/data:
Code:
ls -l /var/lib/squirrelmail
ls -l /var/lib/squirrelmail/data
 
Old 09-15-2009, 06:18 AM   #5
cojones
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 15
I did that configtest.php. No errors and then I logged in using the link on configtest.php and it worked because it was locally. Tried it externally and it didn't work.

Permissions:
ls -l /var/lib/squirrelmail
drwxr-xr-x 2 www-data www-data 4096 2009-09-15 12:29 data

ls -l /var/lib/squirrelmail/data
-rwxr-xr-x 1 www-data www-data 41 2009-09-15 12:29 default_pref
-rw------- 1 www-data www-data 52 2009-09-15 11:22 me@example.com.pref
 
Old 09-15-2009, 06:39 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
What happens if you try to log in using me@example.com as username?
Btw what distro are you using?
 
Old 09-15-2009, 06:39 AM   #7
cojones
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 15
I just did a configtest.php externally and look what I got:
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/lib/squirrelmail/data/) is not within the allowed path(s): (/var/www/vhcs2/gui/:/etc/vhcs2/:/proc/:/var/www/virtual/:/tmp/) in /var/www/vhcs2/gui/tools/squirrelmail/src/configtest.php on line 226
ERROR: Data dir (/var/lib/squirrelmail/data/) does not exist!

I guess I just need to add /var/lib/squirrelmail/data/ to the open_basedir?
 
Old 09-15-2009, 06:41 AM   #8
cojones
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 15
That's the username I was using all the time. I'm using Debian.
 
Old 09-15-2009, 06:51 AM   #9
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
Quote:
I guess I just need to add /var/lib/squirrelmail/data/ to the open_basedir?
I guess you have to add just /var/lib/squirrelmail
 
Old 09-15-2009, 07:26 AM   #10
cojones
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 15
Tried it and didn't help, now put data and attach to a allowed path and changed the paths via squirrelmail_config and I get:
ERROR: Data dir (/var/lib/squirrelmail/data/) does not exist!

I only need to change it via squirrelmail_config, right? I restarted Apache and cleared the cache. Weird.
 
Old 09-15-2009, 07:45 AM   #11
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
It's weird indeed. The strange thing is that it works for localhost.
I know little about apache in debian, but IIRC you have to run "a2ensite www.example.com" to enable a vhost. Have you done that?
 
Old 09-16-2009, 03:01 AM   #12
cojones
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 15
The domain is working for sure cause I can access www.example.com

I keep changing the directory in the squirrelmail-configuration but always get ERROR: Data dir (/var/lib/squirrelmail/data/) does not exist! Is there maybe some other config file that has this value?
 
Old 09-16-2009, 03:16 AM   #13
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
It's written in config.php. You can edit it by hand, or use conf.pl (/etc/squirrelmail/conf.pl) for this.
 
Old 09-16-2009, 03:26 AM   #14
cojones
LQ Newbie
 
Registered: Jul 2009
Posts: 25

Original Poster
Rep: Reputation: 15
squirrelmail-configure is conf.pl so that's pretty much the same. i don't know... i'm gonna try another webmail interface.
 
Old 09-16-2009, 03:43 AM   #15
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
Looking at my config.php, there are 2 options: provider_uri and domain. Change them and see if it helps.
 
  


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 login Chiragrs Linux - Networking 1 05-11-2007 02:05 PM
procmail vacation messages works with command line but not squirrelmail paul_mat Linux - Networking 0 05-02-2006 10:01 PM
SquirrelMail quota plugin that works with cPanel matthewhardwick Linux - General 0 12-15-2005 12:15 PM
imap server works using squirrelmail but problems with sylpheed esteeven Linux - Software 6 01-13-2004 03:19 PM

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

All times are GMT -5. The time now is 09:40 AM.

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