What makes you think you need to connect as user 'ubuntu', when the directory location you want to write to is only writeable by user 'myuser'?

I'd say either have capistrano connect as 'myuser', or log in to the server yourself and change the ownership/permissions on those files to be writeable by user 'ubuntu'.

It looks to me like Capistrano is doing what you told it to do, but you told it to try to log in as user 'ubuntu' and write to a file location that is only writeable by user 'myuser'. So you just need to get your plan straight and fix the server to be set up accordingly. You might want to read up on how unix permissions work, and make sure you understand that, so you can plan your deploy with that understanding.


On 7/9/15 11:17 AM, Mirko Picaro wrote:

In my staging.rb file i need to connect with "ubuntu" username

|server'**.**.****.**',  user:  'ubuntu',   roles:  %w{web app db}|

In my deploy.rb

|set  :deploy_to,  ->  {  "/var/www/myuser/myuser.com/capi"  }|

Server

|var/www/myuser/myuser.com# ls -la
total32
drwxrwx---  8  myuser myuser4096  Jul   9  14:54  .
drwxrwx---  5  myuser myuser4096  Feb  26  17:18  ..
drwxrwx---  7  myuser myuser4096  May   7  13:48  beta
drwxr-xr-x2  myuser myuser4096  Jul   9  14:54  capi
drwxrwx---  9  myuser myuser4096  May   8  20:15  quiz
drwxrwx---  2  myuser myuser4096  May   8  20:10  scoreboards
drwxrwx---  2  myuser myuser4096  May   8  20:10  stats
drwxrwx---  7  myuser myuser4096  Jul   2  14:58  www|

when i do "bundle exec cap staging deploy" i have this error

|  mkdir stderr:  mkdir:  cannot create directory'/var/www/myuser':  Permission 
 denied
  mkdir:  cannot create directory'/var/www/myuser':  Permission  denied|

How i can change user with capistrano?

--
You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+unsubscr...@googlegroups.com <mailto:capistrano+unsubscr...@googlegroups.com>. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/50bfbad0-d256-4528-a924-51b2d1a9d9cd%40googlegroups.com <https://groups.google.com/d/msgid/capistrano/50bfbad0-d256-4528-a924-51b2d1a9d9cd%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/559E9738.6050207%40jhu.edu.
For more options, visit https://groups.google.com/d/optout.

Reply via email to