0

I create an unix domain socket file using this code: UNIXServer.new('tmp/my_socket.sock') It did create socket file but the default file mode is srwxrwxr-x, How can I specific the mode when creating, I found nothing about this problem in ruby doc. Can someone help me out.

timlentse
  • 195
  • 2
  • 11

1 Answers1

0

Use File#chmod:

UNIXServer.new('tmp/my_socket.sock') 
File.chmod 0777, 'tmp/my_socket.sock'
Aleksei Matiushkin
  • 119,336
  • 10
  • 100
  • 160