<div dir="ltr"><span style="font-family:arial, sans-serif;font-size:10.8333px;border-collapse:collapse">hi Greg,<div>My question is I had a Linux kernel source code, </div><div>do they have similar lines as </div>
<div style="color:rgb(80, 0, 80)"><div>&gt;&gt;%defattr(644,root,root,755)</div></div><div>to set permissions for the compiled binaries.</div></span><br><div class="gmail_quote">On Tue, Jan 18, 2011 at 12:49 AM, Greg Freemyer <span dir="ltr">&lt;<a href="mailto:greg.freemyer@gmail.com" target="_blank">greg.freemyer@gmail.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>On Mon, Jan 17, 2011 at 5:41 AM, Pradeep Kumar &lt;<a href="mailto:pradeepkernel@gmail.com" target="_blank">pradeepkernel@gmail.com</a>&gt; wrote:<br>




&gt; HowTo set file permissions of files in /system/bin at compile time of<br>
&gt; kernel.<br>
&gt; example : the command  reboot under system/bin has persmissions as<br>
&gt; lrwxr-xr-x -- reboot<br>
&gt; Is it done throught setting some Kconfig/config variables??<br>
&gt;<br>
&gt; thanks in Advance<br>
&gt; Goudagunta Pradeep Kumar,<br>
<br>
<br>
</div></div>/sbin/reboot is part of the sysvinit package on my distro.<br>
<br>
Why would the kernel build / install have anything to setting its permissions?<br>
<br>
If you are working with a typical Makefile process, permissions are<br>
set when you do a make install.<br>
<br>
If you are working with a rpm, then the specfile that created the rpm<br>
can either use the default &quot;make install&quot; permissions or it can<br>
control the process with as much detail as it wants.  ie. The specfile<br>
has a install section which is basically just some shell script logic.<br>
<br>
If you want to see some specfiles, one of the easiest places to look<br>
is the openSUSE build service. (OBS).  Every package has a specfile<br>
and they are all readily read through.<br>
<br>
The hard part is actually finding a simple enough one that it is easily read.<br>
<br>
I wrote this one for a very simple package a while ago, so it is<br>
pretty easy to read:<br>
<br>
<a href="https://build.opensuse.org/package/view_file?file=open2300.spec&amp;package=open2300&amp;project=hardware&amp;srcmd5=e4de1aefeb524c520ce7d3882a709e60" target="_blank">https://build.opensuse.org/package/view_file?file=open2300.spec&amp;package=open2300&amp;project=hardware&amp;srcmd5=e4de1aefeb524c520ce7d3882a709e60</a><br>




<br>
Note the &quot;%defattr(644,root,root,755)&quot; line.  That is forcing some<br>
permissions, owners, etc.<br>
<font color="#888888"><br>
Greg<br>
</font></blockquote></div><br></div>