Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to run mina deploy with sudo? #86

Closed
sonots opened this issue Jan 25, 2013 · 10 comments
Closed

how to run mina deploy with sudo? #86

sonots opened this issue Jan 25, 2013 · 10 comments

Comments

@sonots
Copy link
Contributor

sonots commented Jan 25, 2013

Is there any option like

set :use_sudo, true

of capistrano?

@sonots
Copy link
Contributor Author

sonots commented Jan 25, 2013

Please put "question" label for this thread since I did not have permissions to do it by myself.

@amargherio
Copy link

Would anyone happen to have an answer for this? I'm running into a similar issue. It's my first time attempting a Rails deploy, and there seems to be no documentation regarding invoking sudo.

@killthekitten
Copy link

It is not a good practice - to execute any stuff on production server as a sudo. If it is needed indeed, can you describe your situation better?

@amargherio
Copy link

I ended up fixing it by reconfiguring the deploy user on my webserver to act as a sudoer. I have my nginx configuration set to point to /srv/www which is owned by root and requires sudo permissions to do anything in the directory. In hindsight, it was easier for me to add the user to do a sudo adduser deploy sudo and sidestep the permissions issue. Thank you for the reply though. Any thoughts on the matter are always helpful for future cases.

@killthekitten
Copy link

Any chance to reconfigure your setup? Or maybe I'm wrong on the sudo topic?

@amargherio
Copy link

I think I'm going to have to reconfigure in the long run and do proper ownership of the web server by a specific user and allow the deploy user to own all of the applications. I wasn't sure of the ramifications of having the /srv/www directory owned by the deploy user though. It's something I need to do some more research on.

@killthekitten
Copy link

My usual pattern is %application_name% user, who owns all the stuff in /home/%application_name% and feels good about it.

@amargherio
Copy link

Ah. This is my first application deploy, so it's a trial by fire for me to figure out the best practices for things like that. Thank you for pointing me in the right direction and helping troubleshoot the above problems.

@killthekitten
Copy link

I can give you a hint: if you're using sudo more than once in your deploy process, you are probably doing something wrong.

@mikong
Copy link
Member

mikong commented Jul 11, 2013

@rstacruz, what do you think about the use_sudo option? I'm leaning towards not supporting this in the interest of encouraging best practice. I admit there might be cases when some best practices are not possible in a specific setup, but I don't think that should be supported by mina.

@d4be4st d4be4st closed this as completed Jul 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants