Skip to content

trying to fix permission for tmp directory #92

@vpereira

Description

@vpereira

Hi,

I'm deploying my app as root. Everything is working fine, there is just a problem: I must set the permissions at the #{app_path}/tmp to "nobody:nogroup".

I added a task like

namespace :deploy do
  desc "set permissions on tmp directory"
  task :fix_permissions => :environment do
    queue! %[ echo "---> fixing permission at #{app_path}/tmp"]
    queue! %[ chown nobody:nogroup -R "#{app_path}/tmp" ]
  end
end

if I add this task to the "deploy" block, it doesn't work *i think the link to current is set after the deploy, because of that it sets the permission in the old release. If i add it to the launch block, i get an error saying that the directory /var/foo/current/tmp (my app_path/tmp) doesn't exist. There is any solution other then switch the deploy user?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions