Skip to contentSkip to conversation

About binding failed: Operation not permitted help

DISCUSSION Caffreyfans 3 participants 3 messages Jul 7, 2020

lore
Share & tools
lore
#0 lore raw

Hello, sir:

          When I run Xenomai applications in an X64 environment, I find that I must use root permissions to execute the application. If you do not use privileged users, you will get the error "binding failed: Operation not permitted". This error indicates that I also saw binding failed: Operation not permitted <https://gitlab.denx.de/Xenomai/xenomai/-/wikis/Troubleshooting#user-content-binding-failed-operation-not-permitted> in the official documentation. But click on the link to find that there is no document, so I would like to ask, could you help me know how to allow ordinary users to execute Xenomai applications?

                                                        Best wish

                                        Author: Caffreyfans

#1 lore raw

Hi,

read this https://gitlab.denx.de/Xenomai/xenomai/-/wikis/Running_As_Regular_User

1. Create a user group named "xenomai", and get the group id, add
kernel parameter xenomai.allowed_group=<gid>,
replace <gid> with group id you just got.
2. Add your user name to "xenomai" group
3. Copy files in xenomai_install_directory/etc/udev/rules.d to
/etc/udev/rules.d
4. Restart.

Regards
Bryan Cheng

Quoted 18 lines · Caffreyfans via Xenomai <[email protected]> 于2020年7月7日周二 下午2:34写道:

Hello, sir:

When I run Xenomai applications in an X64 environment, I find
that I must use root permissions to execute the application. If you do not use privileged users, you will get the error "binding failed:
Operation not permitted". This error indicates that I also saw binding
failed: Operation not permitted
<https://gitlab.denx.de/Xenomai/xenomai/-/wikis/Troubleshooting#user-content-binding-failed-operation-not-permitted>
in the official documentation. But click on the link to find that there is no document, so I would like to ask, could you help me know how to allow ordinary users to execute Xenomai applications?

Best wish

Author: Caffreyfans

#2 lore raw

The steps I have used:

1) add xenomai group

```
sudo addgroup xenomai --gid 1234
sudo addgroup root xenomai
sudo usermod -a -G xenomai $USER 
```

2) update kernel cmd

```
sudo vim /etc/default/grub
\\ add xenomai.allowed_group=1234 to kernel cmd line
sudo update-grub
```

3) udpate udev

```
sudo cp ${xenomai-dir}/etc/udev/rules.d/*  /etc/udev/rules.d
```

4) reboot

But we always use root in our test, didn't meet a requirement to run as common users yet,

BR / Fino (孟祥夫)
Intel – IOTG Developer Enabling

Quoted 35 lines

Sent: Tuesday, July 7, 2020 2:59 PM

Hi,

read this https://gitlab.denx.de/Xenomai/xenomai/-/wikis/Running_As_Regular_User

1. Create a user group named "xenomai", and get the group id, add kernel parameter xenomai.allowed_group=<gid>, replace
<gid> with group id you just got.
2. Add your user name to "xenomai" group
3. Copy files in xenomai_install_directory/etc/udev/rules.d to /etc/udev/rules.d
4. Restart.

Regards
Bryan Cheng

Quoted 19 lines · Caffreyfans via Xenomai <[email protected]> 于2020年7月7日周二 下午2:34写道:

Hello, sir:

When I run Xenomai applications in an X64 environment, I
find that I must use root permissions to execute the application. If you do not use privileged users, you will get the error "binding failed:
Operation not permitted". This error indicates that I also saw binding
failed: Operation not permitted
<https://gitlab.denx.de/Xenomai/xenomai/-/wikis/Troubleshooting#user-c
ontent-binding-failed-operation-not-permitted>
in the official documentation. But click on the link to find that there is no document, so I would like to ask, could you help me know how to allow ordinary users to execute Xenomai applications?

Best wish

Author: Caffreyfans