Skip to contentSkip to conversation

preferred uid?

Xenomai-help luxInteg 5 participants 8 messages May 10, 2011 – May 12, 2011

lore
Share & tools
lore

luxInteg

author
#0 lore raw

greetings

I normally compile stuff as an ordinary user, but I noticed in this area
people often compile as root as kernel modules are involved. I note
xenomai can be compiled either as user or root so is there a preferred way ?

thanks in advance
luxInteg

#1 lore raw
Quoted 4 lines · luxInteg

greetings

I normally compile stuff as an ordinary user, but I noticed in this area people often compile as root as kernel modules are involved. I note xenomai can be compiled either as user or root so is there a preferred way ?

The patched kernel and fundamental Xenomai kernel modules must be installed and loaded as root, but can in principle be built by any user. The userland Xenomai libraries could be built by any user but (for my systems anyway) are installed in areas requiring root permissions. Code you build yourself on top of userland Xenomai can be built by any user (this is what I do), but must be run with a subset of root permissions to allow setting thread priorities etc.

hth

- Tom

#2 lore raw
In reply to luxInteg

Dear luxInteg,

Quoted 4 lines · In message <[email protected]> you wrote:

I normally compile stuff as an ordinary user, but I noticed in this area
people often compile as root as kernel modules are involved. I note
xenomai can be compiled either as user or root so is there a preferred way ?

You should incorporate the rule to always work as normal user only, and only in the very few cases where you really need root permissions (like when installing code into system direcotries or loading kernel modules) you should use "sudo" or similar.

Short answer: all compilations and all other building of sowtare should always be done as normal user only, and never ever as root.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Of course there's no reason for it, it's just our policy.
#3 lore raw
In reply to luxInteg
Quoted 5 lines · luxInteg

greetings

I normally compile stuff as an ordinary user, but I noticed in this area
people often compile as root as kernel modules are involved. I note
xenomai can be compiled either as user or root so is there a preferred way ?

As others have said, compile as ordinary user, run make install or make modules_install as root, or run "sudo make install". Another reason for running "make install" as root, is that root privilege is also required to create the device nodes (/dev/rtheap, /dev/rtp*) needed by Xenomai applications.

Signature · 1 line
                                                                Gilles.
author
#4 lore raw
Quoted 8 lines · On Tuesday 10 May 2011 20:23:43 Gilles Chanteperdrix wrote:
Quoted 6 lines · luxInteg

greetings

I normally compile stuff as an ordinary user, but I noticed in this
area people often compile as root as kernel modules are involved. I
note xenomai can be compiled either as user or root so is there a preferred way ?

Quoted 5 lines

As others have said, compile as ordinary user, run make install or make modules_install as root, or run "sudo make install". Another reason for running "make install" as root, is that root privilege is also required to create the device nodes (/dev/rtheap, /dev/rtp*) needed by Xenomai applications.

yes this is my rule of thumb too

However as I read through the install file in the xenomai tarball I
noticed there was only reference to 'make install' (at least on x86
platforms). i did this and did not bother with running make. Is this
acceptable?

sincerely
luxInteg

#5 lore raw
Quoted 15 lines · luxInteg
Quoted 8 lines · On Tuesday 10 May 2011 20:23:43 Gilles Chanteperdrix wrote:
Quoted 6 lines · luxInteg

greetings

I normally compile stuff as an ordinary user, but I noticed in this
area people often compile as root as kernel modules are involved. I
note xenomai can be compiled either as user or root so is there a preferred way ?

Quoted 5 lines

As others have said, compile as ordinary user, run make install or make modules_install as root, or run "sudo make install". Another reason for running "make install" as root, is that root privilege is also required to create the device nodes (/dev/rtheap, /dev/rtp*) needed by Xenomai applications.

Quoted 6 lines

yes this is my rule of thumb too

However as I read through the install file in the xenomai tarball I
noticed there was only reference to 'make install' (at least on x86
platforms). i did this and did not bother with running make. Is this
acceptable?

As we already told you, it is preferable to run
make
then
sudo make install

For reasons already explained in the three answers you received.

Signature · 1 line
					    Gilles.
author
#6 lore raw
Quoted 23 lines · On Wednesday 11 May 2011 16:32:06 Gilles Chanteperdrix wrote:
Quoted 15 lines · luxInteg
Quoted 8 lines · On Tuesday 10 May 2011 20:23:43 Gilles Chanteperdrix wrote:
Quoted 6 lines · luxInteg

greetings

I normally compile stuff as an ordinary user, but I noticed in this
area people often compile as root as kernel modules are involved. I
note xenomai can be compiled either as user or root so is there a preferred way ?

Quoted 5 lines

As others have said, compile as ordinary user, run make install or make modules_install as root, or run "sudo make install". Another reason for running "make install" as root, is that root privilege is also required to create the device nodes (/dev/rtheap, /dev/rtp*) needed by Xenomai applications.

Quoted 6 lines

yes this is my rule of thumb too

However as I read through the install file in the xenomai tarball I
noticed there was only reference to 'make install' (at least on x86
platforms). i did this and did not bother with running make. Is this
acceptable?

Quoted 6 lines

As we already told you, it is preferable to run
make
then
sudo make install

For reasons already explained in the three answers you received.

so perhaps you should update the INSTALL file that accompany released
tarballs of xenomai then?

#7 lore raw
Quoted 29 lines · luxInteg
Quoted 28 lines · On Wednesday 11 May 2011 16:32:06 Gilles Chanteperdrix wrote:
Quoted 15 lines · luxInteg
Quoted 8 lines · On Tuesday 10 May 2011 20:23:43 Gilles Chanteperdrix wrote:
Quoted 6 lines · luxInteg

greetings

I normally compile stuff as an ordinary user, but I noticed in this
area people often compile as root as kernel modules are involved. I
note xenomai can be compiled either as user or root so is there a preferred way ?

Quoted 5 lines

As others have said, compile as ordinary user, run make install or make modules_install as root, or run "sudo make install". Another reason for running "make install" as root, is that root privilege is also required to create the device nodes (/dev/rtheap, /dev/rtp*) needed by Xenomai applications.

Quoted 6 lines

yes this is my rule of thumb too

However as I read through the install file in the xenomai tarball I
noticed there was only reference to 'make install' (at least on x86
platforms). i did this and did not bother with running make. Is this
acceptable?

As we already told you, it is preferable to run
make
then
sudo make install

Quoted 4 lines
Quoted 1 line

For reasons already explained in the three answers you received.

so perhaps you should update the INSTALL file that accompany released
tarballs of xenomai then?

Do not hesitate to contribute such update since you are now well aware of the issue, a simple patch would do. Anything which may help the Xenomai maintainers to cope with the workload involved in bringing you that software is welcome.

Quoted 5 lines

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Signature · 1 line
Philippe.