Capistrano mkdir permission denied

后端 未结 3 1099
半阙折子戏
半阙折子戏 2021-01-31 05:43

When I run cap production deploy I get cannot create directory ‘/var/www/application/repo’: Permission denied.

So far I\'ve created deploy user

3条回答
  •  伪装坚强ぢ
    2021-01-31 06:03

    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.

提交回复
热议问题