halrun error "cannot gain I/O privileges" error

More
26 Jan 2021 17:03 #196636 by bacon
I installed linuxcnc using a the 2.8.0 Debian 10 Buster PREEMPT-RT iso. I'm using a PCI parallel port card which has the MosChip 9865 chipset. I got the error message "cannot gain I/O privileges - forgot 'sudo make setuid'?" when trying to run the parallel port tester provided here: wiki.linuxcnc.org/cgi-bin/wiki.pl?Parallel_Port_Tester. I then uninstalled the linuxcnc package and built it using these commands:

git clone git://github.com/linuxcnc/linuxcnc.git linuxcnc-dev
cd linuxcnc-dev/src
./autogen.sh
./configure --with-realtime=uspace
make
sudo make setuid
sudo adduser bacon lp

I still get the "cannot gain I/O privileges" error. Any help would be appreciated.

Please Log in or Create an account to join the conversation.

More
27 Jan 2021 00:28 #196688 by andypugh
It sounds like your user account isn't a member of the group that has access to I/O.

You could try adding yourself to lp and/or dialout. (but these are just guesses)

wiki.debian.org/SystemGroups

Please Log in or Create an account to join the conversation.

More
27 Jan 2021 00:43 #196691 by bacon
Thanks for the suggestion Andy. I ran the commands "sudo adduser bacon lp" and "sudo adduser bacon dialout" and still have not luck.

Please Log in or Create an account to join the conversation.

More
27 Jan 2021 01:00 #196694 by andypugh
Googling the error message I see a suggestion that re-doing "sudo make setuid" can bypass the problem.

But, if you are compiling LinuxCNC then typically it installs run-in-place, so you need to, in a terminal:

. ./scripts/rip-environment
linuxcnc

(Yes, the first line really is dot-space-dot-slash)

Please Log in or Create an account to join the conversation.

More
27 Jan 2021 03:03 #196699 by bacon
At a loss for what else to do, I reset all of my BIOS settings to defaults, reinstalled the OS and linuxcnc from the Debian 10 Buster PREEMPT-RT iso, and the problem is now resolved.

Please Log in or Create an account to join the conversation.

More
24 Sep 2021 14:27 #221497 by safarir
Hi All,

I came across the same problem with a new PC. I did some digging and the problem is cause by kernel_lockdown when secure boot is enable. This would only prevent the usage of parallel port, but I expect any machine that have secure boot to probably not have parallel port anyway.

I create a ticket to get this fix:
github.com/LinuxCNC/linuxcnc/issues/1272

I the mean time, you can either disable secure boot, or build from source and comment the same line as indicated in the ticket.

Charles

Please Log in or Create an account to join the conversation.

Time to create page: 0.123 seconds
Powered by Kunena Forum