1 |
On 12/08/2011 02:17 PM, Grant wrote: |
2 |
> I ran squirrelmail/configtest.php and realized I don't have an |
3 |
> attachment directory set up for Squirrelmail: |
4 |
> |
5 |
> ERROR: Attachment dir (/var/local/squirrelmail/attach/) does not exist! |
6 |
> |
7 |
> I don't even have a /var/local/. Would a good Gentoo'er create the |
8 |
> directory in that location? |
9 |
|
10 |
If a website needs to write files, let it do so under its own directory |
11 |
hierarchy. All of our PHP sites have something equivalent to the |
12 |
following in their apache vhost configs: |
13 |
|
14 |
php_admin_value open_basedir /var/www/example.com/www/ |
15 |
php_admin_value upload_tmp_dir /var/www/example.com/www/tmp |
16 |
php_admin_value session.save_path /var/www/example.com/www/tmp |
17 |
|
18 |
That way, if www.example.com is compromised, the rest of the machine is |
19 |
still safe (barring PHP bugs). |