[NBLUG/talk] SquirrelMail and PHP.

ME dugan at passwall.com
Wed Apr 23 13:07:00 PDT 2003


> Now I'm getting the error message:
> -
> Error opening /usr/share/squirrelmail/prefs//default_pref
> Could not create initial preference file!
> /usr/share/squirrelmail/prefs/ should be writable by user apache
> Please contact your system administrator and report this error.
> -
> Now my permissions on that file and directory are:
> drwxrwxr-x    2 apache   apache       4096 Apr 23 11:01 prefs
> -rw-rw-r--    1 apache   apache        106 Apr 23 10:56 default_pref

Often, the SM prefs dir or "data" directory is part of the SM tree. When
you configured it, did you have it set to use "data" as its storage space?

Consider having SM use "../data/" as its "Data Directory"
(When you run the SM configure script, choose item "4" on the mail screen,
and enter "../data/")
Make sure the SM's "data" folder at the begin of the SM dir is:
# chown apache.ap ache data
# chmod 775 data
SM ships with a ".htaccess" file in its shipped "data" folder that denys
browsing access to all so php can still use it, but people who try to
explicitly browse to it should have problems.

"/var" is a better place for prefs (IMO) especially when users can alter
the data through SM. Generally speaking, the only users who write to
"/usr" directories on my system are admin and sometimes my UID. "/var" for
shared user access, and /home/USERNAME for separate user-stored files are
often best for this stuff.

I even go so far as to have /var , /var/log , /var/www and /var/spool all
as separate mounted partitions on multiuser servers. Why? you dont want
logs ruining it for users, you dont was users stopping your logging, and
since m ail and print jobs often get store in /var/spool/* you dont want
problems with mail/printing to ruin it for the web users and your logs.

-ME





More information about the talk mailing list