As described by the Symfony2 documentation,
you must set the proper permissions for the app/cache
and app/logs
directories, since they need to be writable by your webserver.
NOTE : This feature is not available for versions prior to 2.1.X
Settings
There are 4 parameters to care about when using this task:
:writable_dirs
: This is where you specifiy the relative path of dirs that must be writable by your webserver user (i.e. app/cache app/logs for Symfony2):webserver_user
: This is the name of your webserver_user (i.e www-data for many Apache distributions):permission_method
: The method to use for setting permissions (supported values are:acl
,:chmod
and:chown
):use_set_permissions
: This parameter defines whether to run theset_permissions
task. This param isfalse
by default (supported valuestrue
,false
)
NOTE : The
:acl
method relies on thesetfacl
command which may not be available by default on your system (i.e. Debian). You’ll need to enable ACL support before using it.
NOTE : The
:chmod
method uses+a
mode which may not be available on your system (i.e. Debian). You’ll need to choose rather:acl
or:chown
, first one is preferred.
NOTE : The
:chown
method must only be used if neither:acl
nor:chmod
can be used on your system. Please note that to use this method you have to set the:use_sudo
variable totrue
!
Here is a basic example of what these parameters might look like in your deploy.rb
:
NOTE : For multistage usage you just have to override these variables on stage specific files if ever needed.