I have the same problem and here is the capistrano code that implements when you get these errors:
desc 'Symlink linked directories'
task :linked_dirs do
next unless any? :linked_dirs
on release_roles :all do
execute :mkdir, '-pv', linked_dir_parents(release_path)
fetch(:linked_dirs).each do |dir|
target = release_path.join(dir)
source = shared_path.join(dir)
unless test "[ -L #{target} ]"
if test "[ -d #{target} ]"
execute :rm, '-rf', target
end
execute :ln, '-s', source, target
end
end
end
end
As I understand it, the ln command is used here to create symbolic links.
In the reading guide on ln (man ln), we understand that the command will probably fail due to system limitations when trying to create hard link directories.
-d, -F, --directory
allow the superuser to attempt to hard link directories (note: will probably fail
due to system restrictions, even for the superuser)
'ln -d' 'ln -s', ( ).
, . , :
set :format, :pretty
set :log_level, :info