unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* where to chmod socket file?
@ 2009-11-12 23:36 Suraj Kurapati
  2009-11-13  2:03 ` Eric Wong
  0 siblings, 1 reply; 7+ messages in thread
From: Suraj Kurapati @ 2009-11-12 23:36 UTC (permalink / raw)
  To: unicorn list

Hello,

I set the socket for my app to reside in /tmp/ because my app's
Capistrano deploy directory is NFS-mounted:

  listen '/tmp/my_app.sock'

That socket file is being created with mode 0777 + sticky bit.  I
don't want others to accidentally delete or write to this socket file,
so I added the following line to my before_fork() block:

  before_fork do |server, worker|
    File.chmod 0600, '/tmp/my_app.sock'
    # ...
  end

Is there a better place to put this chmod?  Or maybe tell unicorn to
create the socket with mode 0600?

Thanks for your consideration.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-01  1:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-12 23:36 where to chmod socket file? Suraj Kurapati
2009-11-13  2:03 ` Eric Wong
2009-11-15  0:24   ` Eric Wong
2009-11-15  1:52     ` Suraj Kurapati
2009-11-30 22:34       ` Suraj Kurapati
2009-12-01  0:41         ` Eric Wong
2009-12-01  1:36           ` Suraj Kurapati

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).