2

I installed the Google PageSpeed module to my CentOS 7.0 DA VPS. I used this blog, by installing the PageSpeed module: http://www.haloseeker.com/install-go...h-directadmin/

When I check my Apache Error Log, I found the following errors:

[pagespeed:error] [pid 2593] [mod_pagespeed 1.11.33.1-0 @2593] Could not create directories for file /var/cache/mod_pagespeed/v3/domain.com/https,3A/,2Fwww.domain.com/icon_feed.gif,.temp
[pagespeed:error] [pid 2593] [mod_pagespeed 1.11.33.1-0 @2593] /var/cache/mod_pagespeed/v3/domain.com/https,3A/,2Fwww.domain.com/icon_feed.gif,.temp8f2OKe:0: opening temp file: No such file or directory
[pagespeed:error] [pid 2673] [mod_pagespeed 1.11.33.1-0 @2673] Failed to make directory /var/cache/mod_pagespeed/v3/domain.com/https,3A/,www.domain.com/images: Permission denied

How can I solve this problem?

JGeer
  • 1,768
  • 1
  • 31
  • 75

2 Answers2

5

Try to update your directory permission with the following command and let me know if you have any issues.

 chmod -R a+w /var/cache/mod_pagespeed
24x7servermanagement
  • 2,520
  • 1
  • 13
  • 11
  • It was nice if you mentioned what the command does, if it makes it writable to all users then is probably not good. Can anyone clarify please ? – adrianTNT Nov 26 '19 at 15:02
  • It might work because it makes current directories writable, but in near future it might need to create additional sub directories and fail – adrianTNT Nov 26 '19 at 16:29
3

This doesn't have to work. Depending on the Apache configuration (mpm_itk), it's possible that each vhost is served as another user.

So important directories are made under user A, and when another request to host B, user B cannot delete/create subdirectories.

I haven't figured out how to solve this, running CentOS and cPanel as hoster.

-rw-------.  1 tvr86nl tvr86nl   13 Aug 17 23:14 !clean!time!
drwxr-xr-x.  4 tvr86nl tvr86nl   37 Aug 17 00:45 prop_page
drwxr-xr-x. 12 tvr86nl tvr86nl 4.0K Aug 17 12:54 rname
drwxr-xr-x.  3 tvr86nl tvr86nl   22 Aug 16 18:16 v3
root@vps1.sse-ict.nl /var/mod_pagespeed/cache>

so this happens every time when these directories are created :( perhaps a cron-job would do the trick. But it's a mod_pagespeed shortcoming!