Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This was a very helpful and practical tutorial. I don't know why sysops is a source of perpetual confusion for me but it's good to have as many examples as possible. Could you elaborate on the actual hoops that creating a non-root user was creating for you?


First of all I didn't know whether to provision my machine with root or not. Scraping through sysadmin resources I found people installing Ruby with the "deployer" user and people using root for that task. When I tried installing Ruby with deployer I got many permission errors, but I realize that was caused in large part by my lack of experience with sysadministration.

Also, running processes with runit as non-root requires extra [care][1] and I just wanted to get everything up and improve my scripts AFTER I knew that my setup was viable.

Edit

One more thing: I couldn't install ruby-shadow, which is needed to handle passwords with chef, due to some errors with the version of ruby I had.

[1]: http://smarden.org/runit/faq.html#user


With rbenv you can install ruby directly to your deploy user, no sudo required as it installs to your home directory

https://github.com/sstephenson/rbenv/wiki/Deploying-with-rbe...


Thanks, I'll try it as soon as I can :-)


You can deploy the infrastructure with root (or a sudoer), and run the app as a regular user (which is quite often called "deploy" in capistrano recipes).


If I am deploying an application with "deploy" (i.e. non-priviliged), it is ok to also run Unicorn as deploy? Or should it be run as nobody or www-data ?




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: