I've been told that I should create a images folder and an assets folder, and that I needed to make sure that: "they are apache writable". I've also been told to make the app/runtime directory web-writable. Is this the same as apache writable? If so:
How can I do that at once, or know that ?
Doing a ls -l
I'm getting something like:
drwxr-xr-x 13 user user 4096 2011-08-26 10:23 app
drwxr-xr-x 4 user user 4096 2011-08-26 10:23 runtime
drwxr-xr-x 2 user user 4096 2011-08-26 11:11 images
drwxr-xr-x 2 user user 4096 2011-08-26 11:12 assets
Apache, is a program running in the background. Apache is originally started by user
root
(also calledroot-process
). Thisroot-process
launches several child processes which handle the client requests. For security reasons, the child processes are not run by userroot
but as a user with minimal privileges. Usually this user is namedapache
orwww-data
.To find out what user this is for apache v1:
or for apache v2:
Result for apache 2 will be something like this:
In this case the user/group is
www-data
So, in order to make a directory writable by the webserver we have to set the directory’s owner or group to Apache’s owner or group and enable the write permission for it. Usually, we set the directory to belong to the Apache group (
apache
or `www-data or whatever user is used to launch the child processes) and enable the write permission for the group.(
www-data
is the name you found with theps
command above).Regarding:
Yes, this is a directory you need to set writable to the group Apache expects. Probably this will be somewhere in
/var/www/
or it is set as a virtual host in/etc/apache2/sites-enabled/
and/or/etc/apache2/sites-available