* Home directory for workers
@ 2011-10-10 22:25 neil
2011-10-11 8:16 ` Eric Wong
0 siblings, 1 reply; 2+ messages in thread
From: neil @ 2011-10-10 22:25 UTC (permalink / raw)
To: mongrel-unicorn
When unicorn is started as the root user and the worker processes run as as an
unprivileged user because of the "user" option in unicorn.conf then the home
directory of the worker processes is still "/root". This causes trouble with
GPGME at least, which expects to find encryption keys in the user's home
directory.
Apologies in advance if this has been fixed since 4.1.1.
- neil
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Home directory for workers
2011-10-10 22:25 Home directory for workers neil
@ 2011-10-11 8:16 ` Eric Wong
0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2011-10-11 8:16 UTC (permalink / raw)
To: unicorn list
neil@dist.ro wrote:
> When unicorn is started as the root user and the worker processes run
> as as an unprivileged user because of the "user" option in
> unicorn.conf then the home directory of the worker processes is still
> "/root". This causes trouble with GPGME at least, which expects to
> find encryption keys in the user's home directory.
You mean the ENV["HOME"] value? This typically isn't changed when
changing privileges in other daemons like nginx. Changing ENV["HOME"]
automatically inside unicorn has the potential to break existing setups
badly, so it won't be done.
However, you can set it in your after_fork hook (or anywhere else in
your unicorn config file)
after_fork do |server,worker|
ENV["HOME"] = "/home/user"
end
You can even set it in the shell when starting unicorn:
HOME=/home/user unicorn -c unicorn.conf.rb
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-11 8:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-10 22:25 Home directory for workers neil
2011-10-11 8:16 ` Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).