SquirrelMail 1.4.22 unable to create initial preference file Ubuntu 18.04 server


New Member
Hey guys, I have seen this topic raised on other forums and have looked at many of the suggested solutions, but none of them have worked for me thus far.

I have been following this guide.

I'm trying to login to my SquirrelMail server (running Postfix and Dovecot in the bg) but I get the following message whenever I press the "Login" button:

Error opening ../data/default_pref
Could not create initial preference file!
/var/local/squirrelmail/data/ should be writable by user www-data
I have given the www-data user full ownership and permission over the specified directory, as you can see below:

[email protected]:/var/www/html/squirrelmail$ sudo chown -R www-data:www-data /var/www/html/squirrelmail/
[email protected]:/var/www/html/squirrelmail$ sudo chmod 777 -R /var/www/html/squirrelmail/
[email protected]:/var/www/html/squirrelmail$ sudo chown -R www-data:www-data /var/www/html/squirrelmail/data/
[email protected]:/var/www/html/squirrelmail$ sudo chmod 777 -R /var/www/html/squirrelmail/data/
[email protected]:/var/www/html/squirrelmail$ service dovecot restart
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'dovecot.service'.
Authenticating as: callum
[email protected]:/var/www/html/squirrelmail$ cd data/
[email protected]:/var/www/html/squirrelmail/data$ ls
default_pref  index.php
[email protected]:/var/www/html/squirrelmail/data$ ls -ah
.  ..  default_pref  .htaccess  index.php
[email protected]:/var/www/html/squirrelmail/data$ ls -ltha
total 20K
drwxrwxrwx  2 www-data www-data 4.0K Jul 12  2011 .
drwxrwxrwx 16 www-data www-data 4.0K Jul 12  2011 ..
-rwxrwxrwx  1 www-data www-data  480 Jan  6  2011 index.php
-rwxrwxrwx  1 www-data www-data   41 Feb  7  2007 default_pref
-rwxrwxrwx  1 www-data www-data   14 Mar  2  2002 .htaccess
I'm really not sure what other permissions www-data could possibly need; any ideas?


Super Moderator
Staff member
Gold Supporter
Moderators' note:

The above translates roughly to

"Hello good morning, I have the solution to your problem and I do not have to do with any permission ... you just have to go to the "config" directory inside the squirrelmail folder. In this part go to the file "config.php", once inside the search for the section "$ data_dir" and "$ attach_dir", if these observations point to a wrong directory, you should point to the correct directory where squirrelmail is

in my case it was
it is '/ var / local / squirrelmail / ...' both were wrong put in my real directory where I have squirrelmail is "/ var / www / html / squirrelmail / ....

and that's it, a little late but maybe they help other people looking for a solution to the problem in these times"


Bienvenido a linux.org. Si desea que se entienda su opinión, será mejor que escriba en inglés, por favor. Gracias.

Chris Turner

Members online