<div dir="ltr"><div>(This is my first post to OE list, hopefully I am posting to the right mailing list.)</div><div><br></div><div>Background: During the process of trying to configure SSH keys for root user login via dropbear, we realized the permission for /home/root directory is set too loose for group and other members [1]. As a result, dropbears fails when we try to put the key under /home/root/.ssh</div><div><br></div><div>---------</div><div><br></div><div>In the image, /home/root directory is set to 0755:</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>$ stat /home/root</div></div><div><div>  File: /home/root</div></div><div><div>  Size: 4096            Blocks: 8          IO Block: 4096   directory</div></div><div><div>Device: b302h/45826d    Inode: 13268       Links: 4</div></div><div><div>Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)</div></div><div><div>Access: 2016-04-05 22:21:13.000000000</div></div><div><div>Modify: 2016-04-05 22:08:57.000000000</div></div><div><div>Change: 2016-04-05 22:08:57.000000000</div></div></blockquote><div><br></div><div>After some debugging, we believe the permission (0755) is initialized in  <a href="http://base-files_3.0.14.bb">base-files_3.0.14.bb</a> (in line 35) [2].</div><div><br></div><div>A few questions:</div><div>1. I tried looking at the git log for the history, but wasn&#39;t able to find any background on why the permission was set this way. eg. on a desktop Linux (Ubuntu), /root is set to 0700:</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>$ sudo stat /root</div></div><div><div>  File: `/root&#39;</div></div><div><div>  Size: 4096      <span class="" style="white-space:pre">        </span>Blocks: 8          IO Block: 4096   directory</div></div><div><div>Device: 801h/2049d<span class="" style="white-space:pre">        </span>Inode: 1441793     Links: 3</div></div><div><div>Access: (0700/drwx------)  Uid: (    0/    root)   Gid: (    0/    root)</div></div><div><div>Access: 2016-04-05 21:29:17.389725228 -0700</div></div><div><div>Modify: 2016-03-22 17:11:54.912479000 -0700</div></div><div><div>Change: 2016-03-22 17:11:54.912479000 -0700</div></div><div><div> Birth: -</div></div></blockquote><div><br></div><div>2. If we would like to override the directory permission for /home/root in our image, what is the best way to do it? I am not an expert with bitbake, should I be patching the <a href="http://base-files_3.0.14.bb">base-files_3.0.14.bb</a>? using *_append? or I should be looking at some other recipe altogether?</div><div><br></div><div>Sorry for the long email. Thanks in advance.</div><div>Charles</div><div><br></div><div>[1] <a href="https://wiki.openwrt.org/doc/howto/dropbear.public-key.auth#troubleshooting">https://wiki.openwrt.org/doc/howto/dropbear.public-key.auth#troubleshooting</a></div><div><br></div><div>[2] <a href="http://cgit.openembedded.org/cgit.cgi/openembedded-core/tree/meta/recipes-core/base-files/base-files_3.0.14.bb?h=master#n35">http://cgit.openembedded.org/cgit.cgi/openembedded-core/tree/meta/recipes-core/base-files/base-files_3.0.14.bb?h=master#n35</a></div></div>