1. the :setup task was failing on the mkdir, so I modified my
standard.rb like this:
task :setup, :except => { :no_release => true } do
run <<-CMD
sudo mkdir -p -m 775 #{deploy_to} #{releases_path} #{shared_path}
#{shared_path}/system &&
sudo mkdir -p -m 777 #{shared_path}/log &&
sudo mkdir -p -m 777 #{shared_path}/pids
CMD
end
2. cap cold_deploy seems to work until it gets to the svn co command.
That fails with the following error:
** [out :: MYSERVER] svn: Can't make directory
'/var/www/MyAppName/releases/20070115185748': Permission denied
If I run the svn co command manually on my deployment server, I get the
same error. However, if I sudo svn co ..., things work correctly.
What do I need to do, to get svn to be able to create the directories
properly? Do I need to modify the source to sudo the checkout command?
I'm sure I'm missing a logical solution to both problems, but can't
seem to figure it out. I have googled extensively, but have been
unable to find any solutions.
Thanks,
Steve
Mike Gunderloy
http://afreshcup.com
Mike Gunderloy
http://afreshcup.com
Wonder what I'm doing wrong. I haven't tried with the version of
deprec that he used in the webcast though.
On Jan 15, 11:08 am, "newelli...@gmail.com" <newelli...@gmail.com>
wrote:
You need to set the permissions correctly on your server.
> 1. the :setup task was failing on the mkdir, so I modified my
> standard.rb like this:
>
> task :setup, :except => { :no_release => true } do
> run <<-CMD
> sudo mkdir -p -m 775 #{deploy_to} #{releases_path} #{shared_path}
> #{shared_path}/system &&
> sudo mkdir -p -m 777 #{shared_path}/log &&
> sudo mkdir -p -m 777 #{shared_path}/pids
> CMD
> end
The first sudo mkdir sets the permissions to 775 on the
#{releases_path} directory. Read, write and execute for both root and
root's default group, and read and execute for the world.
> 2. cap cold_deploy seems to work until it gets to the svn co command.
> That fails with the following error:
> ** [out :: MYSERVER] svn: Can't make directory
> '/var/www/MyAppName/releases/20070115185748': Permission denied
This error means what it says, the svn command can't make the
directory /var/www/MyAppName/releases/20070115185748 because it
doesn't have correct permissions, because you are checking this code
out with a user that is not root, or in root's default group.
> If I run the svn co command manually on my deployment server, I get the
> same error. However, if I sudo svn co ..., things work correctly.
> What do I need to do, to get svn to be able to create the directories
> properly? Do I need to modify the source to sudo the checkout command?
Lot's of possibilities. Make the first sudo mkdir -m 777. Perform the
checkout as root. Add the user to the group that you use.
> I'm sure I'm missing a logical solution to both problems, but can't
> seem to figure it out. I have googled extensively, but have been
> unable to find any solutions.
--
Ray
What I do:
1) Create a user www and a group www on my deployment server. This is
the same user and group as my webserver use.
2) Add the users that I use for deployment to the www group.
3) sudo chown -R www:www #[deploy_to} <= This could be added to the
setup task
Then my deployment users have proper permission to write to the
release directory.
Then, in post_symlink I do
4) sudo "chown -R www:www #{release_path}"
HTH
--
Ray