views:

35

answers:

1

Hi
When do the cap deploy everything works fine except the ferret-server, while restarting server its try to stop the ferret_server in production mode and try to start the ferret_server but it fails due to permission problem .Here is the output from my deploy file** transaction: commit

  • executing deploy:restart' triggering before callbacks for deploy:restart'
  • executing `ferret:stop'

  • executing "cd /home/sj/reelinfo/current; script/ferret_server -e production stop || true" servers: ["67.23.28.171"] [67.23.28.171] executing command

    ** [out :: 67.23.28.171] sh: script/ferret_server: Permission denied command finished

  • executing "chown www-data -R /home/sj/reelinfo/current/" servers: ["67.23.28.171"] [67.23.28.171] executing command command finished

  • executing "touch /home/sj/reelinfo/current/tmp/restart.txt" servers: ["67.23.28.171"] [67.23.28.171] executing command command finished triggering after callbacks for `deploy:restart'

  • executing `ferret:start'

  • executing "cd /home/sj/reelinfo/current; script/ferret_server -e production start" servers: ["67.23.28.171"] [67.23.28.171] executing command

    ** [out :: 67.23.28.171] sh: script/ferret_server: Permission denied command finished

failed: "sh -c \"cd /home/sj/reelinfo/current; script/ferret_server -e production start\"" on 67.23.28.171

A: 

I've had this problem as well, the issue is that script/ferret_server did not have executable permissions.

I added the following deploy task to handle the permissions:

before "deploy:restart", "correct_ferret_server_permissions"

task :correct_ferret_server_permissions do
  run "chmod a+x #{current_path}/script/ferret_server
end