Hi.

This is for sure not the best answer, but it should work less painful than
yours,

Instead of:

rm -rf app/cache
mkdir app/cache
chmod -R +w app/cache

You can:

rm -rf app/cache/*

This will avoid app/cache from being removed, only its content will.

then:

chmod -R 777 .

This will work if you are in your app's webroot directory, if not just "cd
yourWebApp/dir/".

This is easier.

Of course, this is not good on production servers, use it only on your dev
machine.

2011/6/10 carlosz <carlos....@gmail.com>

>
>
> On Friday, June 10, 2011 4:22:35 PM UTC, theinterned wrote:
>>
>> Hi,
>>
>> I am wondering how you all are managing permissions on your symfony 2
>> projects.
>>
>> I seem to be constantly wrestling with permissions as I generate files
>> in app/cache form the command line (as my user) and from the apache
>> web server (as the apache user). Both of these users are generating
>> files and folders in app cache and the permissions are constantly
>> colliding. I find myself constantly doing this dance:
>>
>> rm -rf app/cache
>> mkdir app/cache
>> chmod -R +w app/cache
>>
>> I have tried the cache:clear console command, but this just runs into
>> the same permission issues.
>>
>> Just curious what other are doing about this?
>>
>>
> On Linux I use acl.
>
> You can use `setfacl -m default:group:www-data:rwX app/cache` to let that
> group edit the newly created files on that dir (so delete all the older ones
> manually).
>
> Then `setfacl -m default:user:username:rwX app/cache` to let your user edit
> the files as well.
>
> To activate acl you need to add it to the drive's mount options.
>
>  --
> 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 users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?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 users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to