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.