我使用capistrano检查我的deploy_to
路径的权限,它总是输出path is not writable on mydomain.com
,即使我给它777权利。
ls -ld /srv/www/
drwxrwxrwx 2 root root 4096 Jul 20 15:24 /srv/www/
这是任务:
desc "Check that we can access everything"
task :check_write_permissions do
on roles(:all) do |host|
if test("[ -w #{fetch(:deploy_to)} ]")
info "#{fetch(:deploy_to)} is writable on #{host}"
else
error "#{fetch(:deploy_to)} is not writable on #{host}"
end
end
end
答案 0 :(得分:0)
我在deploy_to
和staging.rb
设置deploy.rb
,前者覆盖后者。