This is a common scenario in my case.
The only advice I give you is to avoid working with other user than your
regular user (don't work with the root account)
if not, this will lead such file/dir permission issues.
This is the thing.
When you request a web url, i.e your app one, apache will create all the
cache stuff (you already know that),
and anything apache creates, will be apache's property.
In such case you won't have write permission to those files/dirs with your
regular user.
So, there is nothing left to live with:
sudo chmod -R 777 yourApp/dir.
if you are already in your webroot app, this will be as easy as:
sudo chmod -R 777 .
There is a dot(.) at the end of the command.
Don't worry, once you finished your app, you should change file/dir
permission to only be accessible by apache user.
This is security hardening.
2011/6/10 Ruben de Vries rubensay...@gmail.com
I'm struggling a bit to get my linux file permissions setup in a
manner where I can both use the CLI (app/console) and avoid issues
with apache not being able to access files.
The most often occuring problem is (ofcourse) the cache directory;
If I do `app/console cache:clear` WITHOUTH `--no-warmup` the cache
will be warmed up through my current user (ruben or root or whatever
you would be logged in with to the shell).
The result will be that apache (running as www-data on my ubuntu
machine won't have access to the cache files and errors).
If I do `app/console cache:clear` WITH `--no-warmup` the cache will
not be warmed up (asuming I don't execute anything else afterwards)
and the first hit through apache will start filling up the cache/
The result will be that the webapp runs fine (the cache is owned by
www-data), how ever none of the CLI commands can now access those
files and I end up having to change the rights on the files to be able
to do anything.
Now I wrapped some commands in bash files with a sudo -u www-data to
ease up things for me, but I don't feel like it's a good solution at
all.
The main problem is that the files created (through CLI or apache) are
always -rw-r--r-- so playing around with the groups will never get me
anywhere. If group write access would be given to the files then I
could easily set things up so that I can work both through CLI and
through apache, which is a must when developing apps.
The weird thing is, I can't imagine other ppl not having this problem,
yet it's hard to find anything about it (mostly because the keywords
either result in ppl having (stupid) issues with the access rights or
in questions about ACL).
Anyone can shine a pretty light on this :) ?
--
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