Share » Forums » Install & configuration » How can I get EZ to create the cache...

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

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

Monday 27 January 2003 5:06:24 am - 2 replies

Author Message

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.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu