使用capistrano部署应用程序后权限被拒绝

时间:2012-07-19 19:19:11

标签: ruby ruby-on-rails-3 deployment capistrano

我有deploy.rb这样的

set :application, "api"
set :repository,  "git@github.com/org/api.git"

default_run_options[:pty] = true
set :scm_passphrase, "passwd"

set :scm, :git

set :user, "deploy"
set :use_sudo, false
set :deploy_to, "/var/www"
set :deploy_via, :remote_cache

role :web, "192.168.0.95"                          # Your HTTP server, Apache/etc
role :app, "192.168.0.95"                          # This may be the same as your `Web` server
role :db,  "192.168.0.95", :primary => true # This is where Rails migrations will run
role :db,  "192.168.0.95"

正如您所看到的,我正在部署到我们的Intranet ...
在此之后,我在我们的服务器上执行了bundle exec foreman start,当我访问应用程序时,我看到了:

Permission denied - /var/www/releases/20120719190900/tmp/cache

我试图chmod并chown我们的www文件夹,但没有改变......
我在这里想念的是什么? 感谢

2 个答案:

答案 0 :(得分:0)

你能尝试set :use_sudo, true而不是假吗?

答案 1 :(得分:0)

我刚刚在cache文件夹中创建了文件夹tmp,它确实有效!奇怪的是......