Thread (5 messages) 5 messages, 3 authors, 2011-01-19

HT: File Permissions of files in /system/bin at compile time

From: Greg Freemyer <hidden>
Date: 2011-01-17 19:19:30

On Mon, Jan 17, 2011 at 5:41 AM, Pradeep Kumar [off-list ref] wrote:
HowTo set file permissions of files in /system/bin at compile time of
kernel.
example : the command ?reboot under system/bin has persmissions as
lrwxr-xr-x -- reboot
Is it done throught setting some Kconfig/config variables??

thanks in Advance
Goudagunta Pradeep Kumar,

/sbin/reboot is part of the sysvinit package on my distro.

Why would the kernel build / install have anything to setting its permissions?

If you are working with a typical Makefile process, permissions are
set when you do a make install.

If you are working with a rpm, then the specfile that created the rpm
can either use the default "make install" permissions or it can
control the process with as much detail as it wants.  ie. The specfile
has a install section which is basically just some shell script logic.

If you want to see some specfiles, one of the easiest places to look
is the openSUSE build service. (OBS).  Every package has a specfile
and they are all readily read through.

The hard part is actually finding a simple enough one that it is easily read.

I wrote this one for a very simple package a while ago, so it is
pretty easy to read:

https://build.opensuse.org/package/view_file?file=open2300.spec&package=open2300&project=hardware&srcmd5=e4de1aefeb524c520ce7d3882a709e60

Note the "%defattr(644,root,root,755)" line.  That is forcing some
permissions, owners, etc.

Greg
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help