Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

mod_pagespeed cache directory is unwritable by default #945

Closed
@GoogleCodeExporter

Description

@GoogleCodeExporter
The initial installation of mod_pagespeed results in it trying to use a cache 
directory that can only be written by root.

From a clean Debian instance (I used an empty Google Compute Engine "debian-7" 
image):

$ sudo apt-get update
$ sudo apt-get -y upgrade
$ sudo apt-get -y install apache2
$ curl -O 
https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_amd64.deb
$ sudo dpkg -i mod-pagespeed-*.deb
$ sudo apt-get -f install

$ ls -la /var/cache/
total 32
drwxr-xr-x  8 root root 4096 May 14 13:32 .
drwxr-xr-x 12 root root 4096 May 14 13:31 ..
drwxr-xr-x  3 root root 4096 May 14 13:31 apache2
drwxr-xr-x  3 root root 4096 May 14 13:32 apt
drwxr-xr-x  2 root root 4096 May 14 13:31 debconf
drwx------  2 root root 4096 May 14 13:31 ldconfig
drwxr-sr-x 32 man  root 4096 May 14 13:31 man
drwxr-xr-x  2 root root 4096 Apr 29 18:05 mod_pagespeed
$ sudo apachectl restart

At this point, /etc/apache2/mods-enabled/pagespeed.conf contains:

   # The ModPagespeedFileCachePath directory must exist and be
 writable
   # by the apache user (as specified by the User directive).
   ModPagespeedFileCachePath            "/var/cache/mod_pagespeed/"

Yet that directory is only writable by root, not www-data.


Running:

$ sudo chown www-data:www-data /var/cache/mod_pagespeed/

trivially fixes it, but it would be nice to do this ourselves.

See also issue 776, which is talking about a similar problem with yum/CentOS.

Original issue reported on code.google.com by malcolm.rowe on 14 May 2014 at 2:14

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions