0

I'm testing out Capistrano on our new server (Debian 8.2). The process doesn't throw any errors, but still it fails to create the current-symlink.

Here's the last part of the stdout during deployment:

INFO[f2ae0d8c] Running /usr/bin/env ln -s /var/www/XYZ/releases/20151012102406 /var/www/XYZ/releases/current on YXZ
DEBUG[f2ae0d8c] Command: /usr/bin/env ln -s /var/www/XYZ/releases/20151012102406 /var/www/XYZ/releases/current
INFO[f2ae0d8c] Finished in 0.453 seconds with exit status 0 (successful).
INFO[3e8fb9d3] Running /usr/bin/env mv /var/www/XYZ/releases/current /var/www/XYZ on YXZ
DEBUG[3e8fb9d3] Command: /usr/bin/env mv /var/www/XYZ/releases/current /var/www/XYZ
INFO[3e8fb9d3] Finished in 0.163 seconds with exit status 0 (successful).
DEBUG[9908c456] Running /usr/bin/env ls -xtr /var/www/XYZ/releases on YXZ
DEBUG[9908c456] Command: /usr/bin/env ls -xtr /var/www/XYZ/releases
DEBUG[9908c456]     20151012092018  20151012091607  20151012101321  20151012101911  20151012101707
DEBUG[9908c456]     20151012102406
DEBUG[9908c456] Finished in 0.204 seconds with exit status 0 (successful).
INFOKeeping 5 of 6 deployed releases on YXZ
INFO[a38ee3db] Running /usr/bin/env rm -rf /var/www/XYZ/releases/20151012092018 on YXZ
DEBUG[a38ee3db] Command: /usr/bin/env rm -rf /var/www/XYZ/releases/20151012092018
INFO[a38ee3db] Finished in 0.143 seconds with exit status 0 (successful).
DEBUG[412fe858] Running /usr/bin/env if test ! -d /var/www/XYZ/releases; then echo "Directory does not exist '/var/www/XYZ/releases'" 1>&2; false; fi on YXZ
DEBUG[412fe858] Command: if test ! -d /var/www/XYZ/releases; then echo "Directory does not exist '/var/www/XYZ/releases'" 1>&2; false; fi
DEBUG[412fe858] Finished in 0.192 seconds with exit status 0 (successful).
INFO[3218ed31] Running /usr/bin/env echo "Branch master (at 7f394ab) deployed as release 20151012102406 by Aapo" >> /var/www/XYZ/revisions.log on YXZ
DEBUG[3218ed31] Command: echo "Branch master (at 7f394ab) deployed as release 20151012102406 by Aapo" >> /var/www/XYZ/revisions.log
INFO[3218ed31] Finished in 0.159 seconds with exit status 0 (successful).

If I login to YXZ via SSH with the same credentials as Capistrano and run

$ /usr/bin/env ln -s /var/www/XYZ/releases/20151012102406 /var/www/XYZ/releases/current
$ /usr/bin/env mv /var/www/XYZ/releases/current /var/www/XYZ

the symlinks are created just as they should.

What can be the issue?

Kenster
  • 23,465
  • 21
  • 80
  • 106
Apeli
  • 509
  • 7
  • 17

1 Answers1

0

Found the answer from Missing current folder Capistrano Rails 3.2

The option

set :use_sudo, false

had to be set in deploy.rb.

Community
  • 1
  • 1
Apeli
  • 509
  • 7
  • 17