How can I get EZ to create the cache file with the correct owner

Author Message

Stuart Fenton

Monday 27 January 2003 5:06:24 am

All the cache files are created with the owner and group. I am running ez3 of a virtual host and instead of the files being created with my owner and group they are created with 'nobody' and 'nogroup' making them impossible to delete.

Is there are a place in the code that I can add the correct owner and group so than I can empty the cache when necessary.

Also how do I switch off caching while I am developing the site?

Thanks in advance.

Jan Borsodi

Monday 27 January 2003 5:55:08 am

> All the cache files are created with the owner and group. I
> am running ez3 of a virtual host and instead of the files
> being created with my owner and group they are created with
> 'nobody' and 'nogroup' making them impossible to delete.

Only the superuser can change ownership of a file, when a PHP script creates a file the user which runs Apache is the owner.
However it's possible to set other filepermissions by editing site.ini and changing the permission settings in the groups FileSettings to 0777 for dirs and 0666 for files which allows everyone to read/write them. This allows you to remove the files after they have been created by PHP.
Note: This is considered a security risk since everyone can read the files created, for instance passwords could be present.

You could also ask the admin of the hoster to add you to the apache group or something similar.

> Is there are a place in the code that I can add the correct
> owner and group so than I can empty the cache when
> necessary.
>
> Also how do I switch off caching while I am developing the
> site?

It's ContentSettings/ViewCaching in settings/site.ini.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Stuart Fenton

Wednesday 29 January 2003 12:20:33 am

> > All the cache files are created with the owner and group.
> I
> > am running ez3 of a virtual host and instead of the
> files
> > being created with my owner and group they are created
> with
> > 'nobody' and 'nogroup' making them impossible to delete.
>
> Only the superuser can change ownership of a file, when a
> PHP script creates a file the user which runs Apache is the
> owner.
> However it's possible to set other filepermissions by
> editing site.ini and changing the permission settings in the
> groups FileSettings to 0777 for dirs and 0666 for files
> which allows everyone to read/write them. This allows you to
> remove the files after they have been created by PHP.
> Note: This is considered a security risk since everyone can
> read the files created, for instance passwords could be
> present.
>
> You could also ask the admin of the hoster to add you to the
> apache group or something similar.
>
> > Is there are a place in the code that I can add the
> correct
> > owner and group so than I can empty the cache when
> > necessary.
> >
> > Also how do I switch off caching while I am developing
> the
> > site?
>
> It's ContentSettings/ViewCaching in settings/site.ini.

Thanks for you help on this. I changed the default mod settings as a temporary soution while I'm developing the site.

It works for now, which is good enough.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:45:09
Script start
Timing: Jan 18 2025 11:45:09
Module start 'layout'
Timing: Jan 18 2025 11:45:09
Module start 'content'
Timing: Jan 18 2025 11:45:10
Module end 'content'
Timing: Jan 18 2025 11:45:10
Script end

Main resources:

Total runtime0.7766 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0090 588.4063152.6875
Module start 'layout' 0.00900.0051 741.093839.5234
Module start 'content' 0.01410.7607 780.6172547.1172
Module end 'content' 0.77480.0018 1,327.734412.0781
Script end 0.7766  1,339.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5299160.0003
Check MTime0.00150.1902160.0001
Mysql Total
Database connection0.00190.239110.0019
Mysqli_queries0.708191.1790570.0124
Looping result0.00080.1016550.0000
Template Total0.731094.120.3655
Template load0.00280.360420.0014
Template processing0.728293.764920.3641
Template load and register function0.00030.037110.0003
states
state_id_array0.00260.340310.0026
state_identifier_array0.00210.274220.0011
Override
Cache load0.00230.2908600.0000
Sytem overhead
Fetch class attribute can translate value0.00110.142320.0006
Fetch class attribute name0.00270.343840.0007
XML
Image XML parsing0.00060.083420.0003
class_abstraction
Instantiating content class attribute0.00000.001640.0000
General
dbfile0.00090.1142170.0001
String conversion0.00000.001740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs