This is indeed sort of complicated and we have to document it properly. My workflow after the discussion is now:

Assuming Apache:

In Development: (First two steps only once per development machine+console user)
* Add console user to www-data group
* Add www-data to console user group
* Set umask(0007) in autoload.php

In Production:
* Execute all tasks and commands as www-data using sudo.

greetings,
Benjamin

On Wed, 13 Apr 2011 16:37:22 -0500, ryan weaver wrote:
Hey folks!

I'd like to hear what the "proper" workflow is for clearing the cache
and making sure the permissions work for both the CLI and the web
server. Maybe I'm just missing an obvious step - either way we can doc
it so nobody gets confused.

Basically, the cache needs to be writable by the web server as well as
your CLI user. In my setup - which I think is typical - my webserver
and cmd line user are not the same. Here are the problems I'm seeing:

 * Clearing the cache requires root, as cache files have been created
by the web server, they're not writable by my CLI user. So, the clear
cache task fails (in a very ugly way) when run as my normal user

 * After a root cache clear, I have to chmod (or chown) the cache
dirs so that the webserver can write to the cache

So, it's a little awkward. What *should* the workflow be. Making my
webserver and cmd line user the same is not an option - I'm looking
for the workflow that works out-of-the box for your average user.

Thanks!
Ryan Weaver
US Office Head & Trainer - KnpLabs - Nashville, TN
http://www.knplabs.com [1]
http://www.thatsquality.com [2]
 Twitter: @weaverryan

 --
 If you want to report a vulnerability issue on symfony, please send
it to security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups "symfony developers" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to
 [email protected]
 For more options, visit this group at
 http://groups.google.com/group/symfony-devs?hl=en [3]


Links:
------
[1] http://www.knplabs.com/en
[2] http://www.thatsquality.com
[3] http://groups.google.com/group/symfony-devs?hl=en

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to