<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 15, 2015 at 8:21 AM, Anil Jangam <span dir="ltr"><<a href="mailto:anilj.mailing@gmail.com" target="_blank">anilj.mailing@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Attached it here Steve. <div><br></div><div>Its the same one I get which is available when you installed nfd from precompiled binary (sudo apt-get install nfd). So when I compile nfd from sources, its the latest code, and I am not sure which version precompiled binary is. Does configuration different between the two?</div></div></blockquote><div><br></div><div>They are. Specifically, the binary release's config expects the some pre-authorized certificates to live /etc/ndn/certs (this is specified in in the nfd.conf with a relative path).</div><div><br></div><div>I think I can reproduce your original directory permissions problem: fresh install with the NFD 0.3.2 ubuntu package seems to create the ~/.ndn directory as belonging to root. The package's nfd.conf tells NFD to drop permissions at runtime to the "ndn" user and group. This then blows up with your original error when you try to start NFD. However, if you change the config file to specify "root" as the user and group (or just comment out the entire general section), it should get past that problem.</div><div><br></div><div>I'm less certain about your second problem: "Error in setting interest filter (/localhost/nfd/rib): Unauthorized command". That's coming from the rib management portion that I'm less familiar with.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><br></div><div>My next step is to run the nfd in debug mode. Can you please also suggest steps for the same? Preferably debug nfd in Eclipse.</div></div></div></blockquote><div><br></div><div>You're using CDT, correct?</div><div><br></div><div>From your original question, it should be possible to run NFD without root/sudo. You need to make a few changes to your config files:</div><div><br></div><div>nfd.conf:</div><div>1. change the default unix socket path to something you have access to (e.g. /tmp/nfd.sock)</div><div>2. comment out the entire "ether" subsection</div><div>3. comment out the entire general section (there's no need to drop permissions anymore)</div><div><br></div><div>client.conf:</div><div>1. update unix socket path to whatever you did in #1 of nfd.conf</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><span class=""><font color="#888888"><div><br></div><div>/anil.</div><div><br></div></font></span></div></div><div class=""><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 15, 2015 at 5:47 AM, Steve DiBenedetto <span dir="ltr"><<a href="mailto:dibenede@cs.colostate.edu" target="_blank">dibenede@cs.colostate.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">From your original message, it looks like you're trying to run NFD with a custom configuration file. Could you please post it? I'm wondering if there's a problem with the security/authorization settings.</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 14, 2015 at 11:29 PM, Anil Jangam <span dir="ltr"><<a href="mailto:anilj.mailing@gmail.com" target="_blank">anilj.mailing@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Or is it the case that nfd-start internally starts the nfd as superuser (sudo), and it is expecting the group and ownership accordingly. All the files under<span></span><span style="font-size:12.8000001907349px"> /home/anilj1/.ndn belongs to different user and group than root. </span><span><font color="#888888"><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">/anil.</span></div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 14, 2015 at 10:26 PM, Anil Jangam <span dir="ltr"><<a href="mailto:anilj.mailing@gmail.com" target="_blank">anilj.mailing@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Well, just to be sure, I gave 777 as follows..<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>anilj1@insp5521:~/sandbox/NFD$ ls -Rl /home/anilj1/.ndn</div></div><div><div>/home/anilj1/.ndn:</div></div><div><div>total 32</div></div><div><div>-rwxrwxrwx 1 anilj1 anilj1   985 May 14 22:22 client.conf</div></div><div><div>-rwxrwxrwx 1 anilj1 anilj1 18432 May  5 00:17 ndnsec-public-info.db</div></div><div><div>drwxrwxrwx 2 anilj1 anilj1  4096 May  5 00:17 ndnsec-tpm-file</div></div><div><div><br></div></div><div><div>/home/anilj1/.ndn/ndnsec-tpm-file:</div></div><div><div>total 20</div></div><div><div>-rwxrwxrwx 1 anilj1 anilj1 1643 Apr 26 12:35 %JAmVmylSjFZutfeCI1dUvGgM+kOffJmUp3kLgktBVQ=.pri</div></div><div><div>-rwxrwxrwx 1 anilj1 anilj1  398 Apr 26 12:35 %JAmVmylSjFZutfeCI1dUvGgM+kOffJmUp3kLgktBVQ=.pub</div></div><div><div>-rwxrwxrwx 1 anilj1 anilj1  208 May  5 00:17 mapping.txt</div></div><div><div>-rwxrwxrwx 1 anilj1 anilj1 1643 May  5 00:17 rkDt+b7SPQxsx4yL3t%bB4fou2FT1DzhKcpYWfe6Hwo=.pri</div></div><div><div>-rwxrwxrwx 1 anilj1 anilj1  398 May  5 00:17 rkDt+b7SPQxsx4yL3t%bB4fou2FT1DzhKcpYWfe6Hwo=.pub</div></div></blockquote><div><div><br></div><div>But still the same error. </div><div><br></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><div>1431667575.326153 INFO: [RemoteRegistrator] Load remote_register section in rib section</div></div></div><div><div><div>1431667575.326258 INFO: [RibManager] Listening on: /localhost/nfd/rib</div></div></div><div><div><div>1431667575.334410 INFO: [RibManager] Start monitoring face create/destroy events</div></div></div><div><div><div>1431667575.345949 FATAL: [NFD] Error in setting interest filter (/localhost/nfd/rib): Unauthorized command</div></div></div></blockquote><span><font color="#888888"><div><div><br></div><div>/anil.</div><div><br></div><div><br></div></div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 14, 2015 at 10:13 PM, Lan Wang (lanwang) <span dir="ltr"><<a href="mailto:lanwang@memphis.edu" target="_blank">lanwang@memphis.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div style="word-wrap:break-word">
What about adding w permission to the user and r permission to group and other?<br>
<div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px;font-size:medium">
<div style="word-wrap:break-word">
<br>
Lan</div>
</span></div>
</div>
</div>
<br>
<div>
<div>On May 15, 2015, at 12:10 AM, Anil Jangam <<a href="mailto:anilj.mailing@gmail.com" target="_blank">anilj.mailing@gmail.com</a>></div>
<div> wrote:</div><div><div>
<br>
<blockquote type="cite">
<div dir="ltr">
<div>Hi Prof Wang,</div>
<div><br>
</div>
Ok.. it was: -r-------- 1 anilj1 anilj1 1643 Apr 26 12:35 %JAmVmylSjFZutfeCI1dUvGgM+kOffJmUp3kLgktBVQ=.pri
<div><br>
</div>
<div>After added READ permissions to all, it is now throwing following errorr. </div>
<div><br>
</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div>1431666355.351034 INFO: [RemoteRegistrator] Load remote_register section in rib section</div>
<div>1431666355.351254 INFO: [RemoteRegistrator] Load remote_register section in rib section</div>
<div>1431666355.351316 INFO: [RibManager] Listening on: /localhost/nfd/rib</div>
<div>1431666355.358148 INFO: [RibManager] Start monitoring face create/destroy events</div>
<div><font color="#ff0000">1431666355.370436 FATAL: [NFD] Error in setting interest filter (/localhost/nfd/rib): Unauthorized command</font></div>
<div><br>
</div>
</blockquote>
Ideally, I am trying to run the 'nfd' in debug mode, either from Eclipse or from command line gdb, to do a step wise execution. I want to understand certain part of the code. Any pointers for this case will help.
<div><br>
</div>
<div>/anil.<br>
<div><br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, May 14, 2015 at 9:57 PM, Lan Wang (lanwang) <span dir="ltr">
<<a href="mailto:lanwang@memphis.edu" target="_blank">lanwang@memphis.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word">What are the permissions of the .ndn directory and the files in it?<br>
<div>
<div style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px;font-size:medium">
<div style="word-wrap:break-word"><br>
Lan</div>
</span></div>
</div>
</div>
<br>
<div>
<div>On May 14, 2015, at 11:45 PM, Anil Jangam <<a href="mailto:anilj.mailing@gmail.com" target="_blank">anilj.mailing@gmail.com</a>></div>
<div> wrote:</div>
<br>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">Hi,
<div><br>
</div>
<div>I am attempting to run 'nfd' from compiled binary. However, I am running into a following problem. (see the last line). </div>
<div><br>
</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div>sudo ./build/bin/nfd --config ./ndn_conf/nfd.conf</div>
<div>1431664563.044290 INFO: [StrategyChoice] setDefaultStrategy /localhost/nfd/strategy/best-route/%FD%03</div>
<div>1431664563.044910 INFO: [InternalFace] registering callback for /localhost/nfd/fib</div>
<div>1431664563.045027 INFO: [InternalFace] registering callback for /localhost/nfd/faces</div>
<div>1431664563.045111 INFO: [InternalFace] registering callback for /localhost/nfd/strategy-choice</div>
<div>1431664563.045207 INFO: [InternalFace] registering callback for /localhost/nfd/status</div>
<div>1431664563.045289 INFO: [FaceTable] Added face id=1 remote=internal:// local=internal://</div>
<div>1431664563.049813 INFO: [CommandValidator] Giving privilege "faces" to identity /localhost/daemons/nfd/ksk-1430084088432</div>
<div>1431664563.049861 INFO: [CommandValidator] Giving privilege "fib" to identity /localhost/daemons/nfd/ksk-1430084088432</div>
<div>1431664563.049886 INFO: [CommandValidator] Giving privilege "strategy-choice" to identity /localhost/daemons/nfd/ksk-1430084088432</div>
<div>1431664563.049917 WARNING: [CommandValidator] Wildcard identity is intended for demo purpose only and SHOULD NOT be used in production environment</div>
<div>1431664563.049943 INFO: [CommandValidator] Giving privilege "faces" to identity wildcard</div>
<div>1431664563.049969 INFO: [CommandValidator] Giving privilege "strategy-choice" to identity wildcard</div>
<div>1431664563.050159 INFO: [TablesConfigSection] Setting CS max packets to 65536</div>
<div>1431664563.050738 INFO: [MulticastUdpFace] [id=-1,local=udp4://<a href="http://10.0.0.37:56363/" target="_blank">10.0.0.37:56363</a>,remote=udp4://<a href="http://224.0.23.170:56363/" target="_blank">224.0.23.170:56363</a>] Creating face</div>
<div>1431664563.050818 INFO: [FaceTable] Added face id=256 remote=udp4://<a href="http://224.0.23.170:56363/" target="_blank">224.0.23.170:56363</a> local=udp4://<a href="http://10.0.0.37:56363/" target="_blank">10.0.0.37:56363</a></div>
<div>1431664563.053394 INFO: [EthernetFace] [id=-1,local=<a>dev://wlan0,remote=ether://[01:00:5e:00:17:aa]]</a> Creating face on wlan0/60:36:dd:a8:11:73</div>
<div>1431664563.081330 INFO: [FaceTable] Added face id=257 remote=<a>ether://[01:00:5e:00:17:aa]</a> local=<a>dev://wlan0</a></div>
<div>1431664563.090395 INFO: [EthernetFace] [id=-1,local=<a>dev://eth0,remote=ether://[01:00:5e:00:17:aa]]</a> Creating face on eth0/e0:db:55:d6:eb:e3</div>
<div>1431664563.105145 INFO: [FaceTable] Added face id=258 remote=<a>ether://[01:00:5e:00:17:aa]</a> local=<a>dev://eth0</a></div>
<div>1431664563.115727 INFO: [CommandValidator] Giving privilege "faces" to identity /localhost/daemons/nfd/ksk-1430084088432</div>
<div>1431664563.116162 INFO: [CommandValidator] Giving privilege "fib" to identity /localhost/daemons/nfd/ksk-1430084088432</div>
<div>1431664563.116575 INFO: [CommandValidator] Giving privilege "strategy-choice" to identity /localhost/daemons/nfd/ksk-1430084088432</div>
<div>1431664563.116942 WARNING: [CommandValidator] Wildcard identity is intended for demo purpose only and SHOULD NOT be used in production environment</div>
<div>1431664563.117065 INFO: [CommandValidator] Giving privilege "faces" to identity wildcard</div>
<div>1431664563.117297 INFO: [CommandValidator] Giving privilege "strategy-choice" to identity wildcard</div>
<div>1431664563.117670 INFO: [FaceTable] Added face id=255 remote=null:// local=null://</div>
<div>1431664563.122135 INFO: [FaceTable] Added face id=254 remote=contentstore:// local=contentstore://</div>
<div>1431664563.124781 INFO: [PrivilegeHelper] dropped to effective uid=116 gid=126</div>
<div>1431664563.127378 INFO: [UnixStreamFace] [id=-1,local=<a>unix:///run/nfd.sock,remote=fd://25]</a> Creating face</div>
<div>1431664563.127473 INFO: [FaceTable] Added face id=259 remote=<a>fd://25</a> local=<a>unix:///run/nfd.sock</a></div>
<div><font color="#ff0000">1431664563.127904 FATAL: [NFD] FileStore: error opening file for reading: /home/anilj1/.ndn/ndnsec-tpm-file/%JAmVmylSjFZutfeCI1dUvGgM+kOffJmUp3kLgktBVQ=.pri</font></div>
<div><font color="#ff0000"><br>
</font></div>
</blockquote>
<font>I also tried after changing the grp and owner of the /home/anilj1/.ndn to 'root' but yet it did not help. Is something missing here?</font>
<div><br>
</div>
<div><font>One thing I am not sure when the .ndn folder is created? Is it created first time by the nfd process after it is started? What if I remove this folder before I start nfd locally? </font></div>
<div><font><br>
</font></div>
<div><font>Also is it possible to run nfd from a local user and not with sudo proviledges?</font></div>
<div>
<div><font><br>
</font></div>
<div><font>/anil.<br>
</font>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Nfd-dev mailing list<br>
<a href="mailto:Nfd-dev@lists.cs.ucla.edu" target="_blank">Nfd-dev@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div></div></div>
<br>
</div>

</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Nfd-dev mailing list<br>
<a href="mailto:Nfd-dev@lists.cs.ucla.edu" target="_blank">Nfd-dev@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>