Project

General

Profile

Actions

Bug #1272

closed

Set proper permissions for UNIX socket

Added by Alex Afanasyev almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Category:
Faces
Target version:
Start date:
02/18/2014
Due date:
% Done:

100%

Estimated time:

Description

There are two implications. One (acceptable) is that I have to run daemon as root, as only root on my machine is allowed to create sockets under /var/run (should we move back to /tmp?)

Second (not acceptable) is that I cannot write to NFD's socket as a normal user:

[cawka@cawka-mac ndn-cpp (master)]$ NFD=1 ./build/examples/producer
ERROR: error while connecting to the forwarder (Permission denied)

Basically we didn't set ga+w permission:

[cawka@cawka-mac ~]$ ls -al /var/run/ | grep nfd.sock
srwxr-xr-x   1 root  daemon     0 Feb 18 19:25 nfd.sock

Small note about boost::filesystem. Unfortunately, API to set permissions is available only since 1.49, so we can't use it :(

Actions

Also available in: Atom PDF