node[:deploy].each do |application, deploy|
  script "storage_permissions" do
    interpreter "bash"
    user "root"
    cwd "#{deploy[:deploy_to]}/current"
    code <<-EOH
    chown -R www-data:www-data app/storage
    EOH
  end
end

node[:deploy].each do |application, deploy|
  script "storage_permissions" do
    interpreter "bash"
    user "root"
    cwd "#{deploy[:deploy_to]}/current"
    code <<-EOH
    chown -R www-data:www-data app/storage
    chown -R www-data:www-data public/documents
    EOH
  end
end

Add RW permissions to image folders
Add RW permissions to image folders
