# dspam-web: Unable to write preferences: Permission denied

## NotExcessive

Hi all;

I'm trying to get dspam-web to play nice. I've been following the howto at http://www.gentoo-wiki.info/HOWTO_Spam_Filtering_with_DSPAM_and_Postfix#Web_Interface.3F, creating a user "filter".

Whenever I try to save the preferences, I get the "Unable to write preferences: Permission denied" error. 

Can anyone point me in the right direction please?

----------

## aim nano

Try changing the preferences as root...sounds like you don't have permissions to write the preferences file to the disk as a normal user.

also make sure you didn't forget this line (you might need to change the owner/group)

```
chown -R filter:users ~filter/public_html/
```

chown - Change file ownership

Synopsis

chown [-R [ -H | -L | -P ]] [ -h ] owner[:group] file ...

----------

## NotExcessive

Sorry, forgot to mention that I'm using virtual users and MySql:  I've emerged mod_auth_mysql and have the following in /etc/apache2/vhosts.d/default_vhost.include:

```
<IfModule alias_module>  

              ScriptAlias /cgi-bin/ "/home/filter/public_html/cgi-bin"

</IfModule>

# "/var/www/localhost/cgi-bin" should be changed to whatever your ScriptAliased

# CGI directory exists, if you have that configured.

<Directory "home/filter/public_html/cgi-bin">

    Options ExecCGI

    AuthType Basic

    AuthName "dspam"

    Require valid-user

    AuthUserFile /var/www/localhost/password

    SetHandler cgi-script

</Directory>

```

----------

