Setup service account for webapp

Fairly new to servers and linux in general but have successfully followed the guide here about how to deploy Python web apps with gunicorn and nginx. However everything in that article is done under a user with sudo privileges which seems risky.

I'd now like to create a service account or user that only has access to whats required to run the app. The idea being that when an http request comes into the server everything required to serve a response is done by an account with the minimum privileges needed to serve the response properly and nothing else. I understand that is good practice? Is there a name for this? If there's a better practice feel free to mention that.

How do I go about doing this and what will I need to give the service account access to based the linked article? Thank you.

1 Answer

After doing a bit more digging came across this useful solution.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like