1
votes

I have been struggling with that for a while. Under capifony I run $ cap deploy:setup and it creates two files on my remote host: 1/ releases 2/ shared. I think this shows that until now everything works pefect.

But when I start to deploy, I got the following error.

    *** [err :: ***] ln: creating symbolic link `public_html/Symfony/releases/20120814164750/app/logs': Permission denied
    *** [deploy:update_code] rolling back
    failed: "sh -c 'ln -nfs public_html/Symfony/shared/app/logs public_html/Symfony/releases/20120814164750/app/l

ogs'"

Looks like nothing is copied to releases. A lot is copied to shared (Maybe everything) I don't know if it's normal.

May I got your advise how I may solve the problem? Where should I look for some hint. I am out of clue.. THanks a lot.

PS: below is my deploy.rb file

set   :application,   "My app"
set   :deploy_to,     "public_html/Symfony"
set   :domain,        "mydomain.com"
ssh_options[:port] = "2222"
set :user, "****"

set   :scm,           :git
set   :repository,    "file:///media/Pierre/Symfony"
set   :deploy_via,    :rsync_with_remote_cache

role  :web,           domain
role  :app,           domain
role  :db,            domain, :primary => true

set   :use_sudo,      false
set   :keep_releases, 3

set :shared_files,      ["app/config/parameters.yml"]

set :shared_children,     [app_path + "/logs", web_path + "/uploads", "vendor"]

set :use_composer, true

set :update_vendors, true
2
Which capifony version to you use? - William Durand

2 Answers

0
votes

From what you have posted I've got two suggestions.

First is that it's something with the rights. Check the "Setting up Permissions" section in the documentation: http://symfony.com/doc/current/book/installation.html#configuration-and-setup. As logs is shared it could be an issue.

But if it's your first deployment, than could it be that you've got app/logs directory under the version control? Check that your .gitignore is correct: http://symfony.com/doc/current/cookbook/workflow/new_project_git.html

0
votes

I fixed this error by adding the following lines to my deploy.rb file:

ssh_options[:forward_agent] = true
default_run_options[:pty] = true

This answer is useful for debugging capistrano and finding out exactly which errors are causing your deployments to fail.