I am trying to deploy my Yii application using capistrino 3. Sever is EC2 ubuntu instance which by default comes with a user ubuntu. I have added ubuntu user to group www-data and trying to deploy using capistrino 3 but in old releases these runtime files creates some problem.
groups ubuntu
ubuntu : ubuntu adm dialout cdrom floppy sudo audio dip www-data video plugdev netdev
groups www-data
www-data : www-data
Apache server has created some files/folder as
drwxr-sr-x 2 www-data ubuntu 4096 Oct 12 15:23 CSS
drwxr-sr-x 2 www-data ubuntu 4096 Oct 12 15:17 HTML
When i tried to deploy the new version it says,
DEBUG[c9d0212b] rm: cannot remove '/var/www/html/zl/releases/20141012145437/frontend/runtime/CSS/4.5.0,24166bfe16a0cc6bd18d813b83121ef2eaf16545,1.ser': Permission denied
What can be a workaround? I have added user ubuntu to group www-data, but new files have owner www-data and group ubuntu. i have no idea how it reversed.
The solution is to add your deploy user
in a www-data
group by following the bellow command:
sudo usermod -a -G www-data deployer_user_name
To check the user new group
, follow the bellow command:
groups deployer_user_name
After that capistrano clean up will be smooth ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With