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

Allow the upstart job to be executed as a different user #116

Merged
merged 2 commits into from
Dec 31, 2013

Conversation

aparkinson
Copy link
Contributor

Running services as Root can be a security risk, upstart can start programmes as a different user just like SystemV

@lightbend-cla-validator

Hi @aparkinson,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement:

http://typesafe.com/contribute/cla

@aparkinson
Copy link
Contributor Author

CLA now signed

@@ -18,7 +18,10 @@ respawn limit ${{retries}} ${{retryTimeout}}
# set the working directory of the job processes
chdir ${{chdir}}

# changes to the user and group before running the job's process
setuid ${{daemon_user}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (upstart doc). On which system did you test it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've only tested with Ubuntu 12.04 LTS (Precise Pangolin)

It doesn't work for Ubuntu 10.04 LTS Lucid as setuid wasn't introduced until version 1.4 of upstart

@jsuereth
Copy link
Member

Thanks for the contribution! Looks great to me. Would you also mind updating this with your feature?
https://github.com/sbt/sbt-native-packager/wiki/Tested-On

I'm trying to track our level of features/testing on the server archetype for the next release. I think we may just try to round out the linux packages first, then a different release for windows support.

Thanks!

  • Josh

jsuereth added a commit that referenced this pull request Dec 31, 2013
Allow the upstart job to be executed as a different user
@jsuereth jsuereth merged commit 3ccd3ef into sbt:master Dec 31, 2013
@aparkinson aparkinson deleted the upstart-user branch December 31, 2013 17:54
@aparkinson
Copy link
Contributor Author

@jsuereth I'll update the page with my findings.

Awesome plugin, I'm trying to build deb of our Play! app for our continuous delivery pipeline so I'm sure we can help with testing and rounding out that side of the server archetype

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

Successfully merging this pull request may close these issues.

4 participants