Development

#4884 (Failed to write cache file (permission issue))

You must first sign up to be able to contribute.

Ticket #4884 (closed defect: invalid)

Opened 6 years ago

Last modified 6 years ago

Failed to write cache file (permission issue)

Reported by: adrive Assigned to: fabien
Priority: minor Milestone:
Component: cache Version: 1.2.0 DEV
Keywords: Cc:
Qualification: Unreviewed

Description

Hello. Since symfony 1.1 (now I am using symfony 1.2-DEV) i am notising sometimes errors like this:

kmet@book /www/dev/eif $ ./symfony cc
>> cache     Clearing cache type "all" for "frontend" app and "prod" env

  Failed to write cache file "/www/dev/eif/cache/frontend/prod/config/config_settings.yml.php" generated from configuration file "config/settings.yml".

That's because the file is created from apache (www-data:www-data)

kmet@book /www/dev/eif $ ls -la /www/dev/eif/cache/frontend/prod/config/config_settings.yml.php
-rw-r--r-- 1 www-data www-data 1555 2008-11-08 22:43 /www/dev/eif/cache/frontend/prod/config/config_settings.yml.php

and is writable only for owner (not group, or others).

It would be fine, if the cache files will be created writable for all, or at least for group, to be able to clear the cache files created by apache from the command line as regular user.

Change History

11/10/08 09:41:28 changed by FabianLange

  • status changed from new to closed.
  • resolution set to invalid.

this cannot be fixed by symfony, because this is your server setup. If you have such scenarios I would recommend to make the directory writable to wwwdata and you user (which is most likely only possible with 777) and then apply the setgid flag to is http://en.wikipedia.org/wiki/Setgid chmod +s cache