Charl Wentzel charl.wentzel at
Sat May 17 18:20:10 UTC 2014

On 17/05/2014 14:11, Dimitri John Ledkov wrote:
> Whilst coding you may want to open up /dev/port, e.g.
> $ sudo chmod g+w /dev/port # if you need r/w access
> $ sudo adduser `id -un` kmem
> (re-login)
> This will open up /dev/port for r+w to yourself (well anyone in kmem
> group). This is slightly better than running things as root.
Yes, I think that's a good solution.  Thanks
> However, you'll need a solution to do something sensible in the
> finally shipped application. E.g. do start your application as root
> (or use setuid on the binary), execute ioperm()/iopl() to grant access
> to I/O ports you need, and after that drop privileges. For more info
> see
On the target platform the application is started up in rc.local and run
as root, so no issues there.  It's only during development that I need
to debug as root.

Thanks for the advice

More information about the Ubuntu-devel-discuss mailing list