Capistrano mkdir permission denied

假装没事ソ 提交于 2019-12-02 16:48:34
shankardevy

By default Capistrano 3 deploys to /var/www which is not writable by deploy user. You need to change the ownership of /var/www to deploy user using the following command.

sudo chown deploy:deploy /var/www/

After this, you should be able to deploy your app without permission error.

Credit to Bob Roberts.

I think this should be an answer as its easy to miss your comment. I know I missed it few times.

sudo chown -R deploy:deploy /var/www/

or whatever your username is

sudo chown -R username:username /var/www/

Had the same error here, following the good tutorial of GoRails "Deploy Ruby on Rails To Production in 2019", where he create a user "deploy" and set to deploy the app in "home/deploy". Don't forget that you have to use the username created on the server. So deploy's directory is "home/USERNAME".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!