#107 new
Mina Naguib

Permissions too restrictive on single socket

Reported by Mina Naguib | 2009-08-10 14:50:34 UTC | in Future

When a single thin is started with the --socket option:

thin --socket /tmp/app1.thin.sock start
>> Using rails adapter
>> Thin web server (v1.2.2 codename I Find Your Lack of Sauce Disturbing)
>> Maximum connections set to 1024
>> Listening on /tmp/app1.thin.sock, CTRL+C to stop

The permissions on the socket are too restrictive to allow others to talk to it:

ls -la /tmp/app1.thin.sock
srwxr-xr-x 1 mina mina 0 Aug 10 14:47 /tmp/app1.thin.sock

Since nginx is not running as "mina", I need to manually relax the socket's permissions with chmod every time (give "w"rite to world).

Interestingly, thin started with multiple servers via --servers doesn't have this problem.

Comments and changes to this ticket

  • macournoyer

    macournoyer 2009-08-10 22:07:06 UTC

    If you daemonize the process (-d option) it should work to.

    Why don't you daemonize it?

  • Mina Naguib

    Mina Naguib 2009-08-10 23:24:07 UTC

    No reason, other that it wasn't part of usual flow (GNU screen/window 0=web server/easy restart via ctrl+c,up,enter)

    --daemonize appears to work. Thanks for the tip.

    Took me a while to figure it out though. If it's a trivial fix I think it might be worth addressing.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages