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... |
Does /var/lib/squirrelmail/data/ default_pref exist?
|
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.
|
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 |
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 |
What happens if you try to log in using me@example.com as username?
Btw what distro are you using? |
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? |
That's the username I was using all the time. I'm using Debian.
|
Quote:
|
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. |
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? |
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? |
It's written in config.php. You can edit it by hand, or use conf.pl (/etc/squirrelmail/conf.pl) for this.
|
squirrelmail-configure is conf.pl so that's pretty much the same. i don't know... i'm gonna try another webmail interface.
|
Looking at my config.php, there are 2 options: provider_uri and domain. Change them and see if it helps.
|
All times are GMT -5. The time now is 12:15 PM. |