Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 使用capistrano部署应用程序后权限被拒绝_Ruby_Ruby On Rails 3_Deployment_Capistrano - Fatal编程技术网

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

Ruby 使用capistrano部署应用程序后权限被拒绝,ruby,ruby-on-rails-3,deployment,capistrano,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_

我有一个像这样的
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"
如您所见,我正在部署到我们的内部网…
在此之后,我在服务器上执行了
bundle exec foreman start
,当我访问应用程序时,我看到:

Permission denied - /var/www/releases/20120719190900/tmp/cache
我试图修改我们的www文件夹,但没有改变…
我错过了什么?

谢谢

你能试试
设置吗:用_sudo,true
代替false吗?

我刚刚在
tmp
文件夹中创建了
cache
文件夹,它成功了!奇怪的事情…

在当前/tmp文件夹而不是releases/tmp文件夹上尝试chmod和chown。我做了
sudo chown-R user/var/www
,但没有成功。试图打开/tmp文件夹。同样的事情同样的事情…我尝试部署到
/var/rails
而不是
/var/www