adrianTNT edited a comment on issue #1963: Running pagespeed with 
mpm_itk_module (each vhost as different user)
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1963#issuecomment-558815408
 
 
   Hi.
   Yes, in main apache conf, the user and group is apache:apache, then example1 
and example2 in the vhosts config.
   
   Users example1 and example2 were already part of `apache` additional group.
   
   If the main directory is missing, it is created as root:root, not as apache:
   
   `drwxr-xr-x 4 root root 80 Nov 26 20:49 /var/cache/mod_pagespeed`
   
   Inside it, it creates folders like this:
   ```
   ls -lh /var/cache/mod_pagespeed
   drwxr-xr-x 2 apache  apache  40 Nov 26 16:55 example1.com
   drwxr-xr-x 2 apache  apache  40 Nov 26 16:55 example2.com
   ```
   but it cannot write to them.
   IF I made the main folder writable, e.g 0777 (just to test), it creates the 
shm_metadata_cache as belonging to ... the first user that attempted to create 
it, in this case `example2`:
   
   ```
   ls -lh /var/cache/mod_pagespeed
   drwxr-xr-x 2 apache  apache  40 Nov 26 16:55 example1.com
   drwxr-xr-x 2 apache  apache  40 Nov 26 16:55 example2.com
   drwxr-xr-x 3 example2 example2 60 Nov 26 16:55 shm_metadata_cache
   ```
   "Great", now only example2 can write there, in what I think is a common 
folder (shm_metadata_cache). So I am a bit lost. 
   The example1.com and example2.com cannot be written, they remain empty and 
it shows the write error in logs:
   
   ```
   [pagespeed:error] [pid 4502] [mod_pagespeed 1.13.35.2-0 @4502] Could not 
create directories for file 
/var/cache/mod_pagespeed/example2.com/v3/example2.com/https,3A/,2Fwww.example2.com/thumbs/some_images.jpg,.temp
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to