[Errno 13] Permission denied: '/dev/cuaU0'

Need support for GhostBSD. Ask here if your question does not fit elsewhere.
Post Reply
USNCPOSharky
Posts: 15
Joined: Wed Jun 30, 2021 7:51 am

[Errno 13] Permission denied: '/dev/cuaU0'

Post by USNCPOSharky »

Using the latest build of GhostBSD - all updates have been applied.

I have installed Chirp - a software application that allows a computer to program frequenceis to a handheld radio using a USB cord for communication.

When attemtping to use the Chirp software - I get the following error

$ [Errno 13] could not open port /dev/cuaU0: [Errno 13] Permission denied: '/dev/cuaU0'

I am guessing that the specified port needs to be given permission for access (read/write) - or something to that effect.

How would I accomplish this?
wb7odyfred
Posts: 188
Joined: Sat Nov 12, 2016 5:44 pm

[SOLVED] Re: [Errno 13] Permission denied: '/dev/cuaU0'

Post by wb7odyfred »

Hello USNCPOSharkey,
This is tested from my Raspberry Pi 4B running FreeBSD-15.0-CURRENT version. I am certain GhostBSD x86_64 is nearly the same.
ls -l /dev/cu*
crw-rw---- 1 uucp dialer 0x30 Jan 21 18:55 /dev/cuau0
crw-rw---- 1 uucp dialer 0x31 Jan 21 18:55 /dev/cuau0.init
crw-rw---- 1 uucp dialer 0x32 Jan 21 18:55 /dev/cuau0.lock
crw-rw---- 1 uucp dialer 0x36 Jan 21 18:55 /dev/cuau1
crw-rw---- 1 uucp dialer 0x37 Jan 21 18:55 /dev/cuau1.init
crw-rw---- 1 uucp dialer 0x38 Jan 21 18:55 /dev/cuau1.lock

chmod 666 /dev/cuau0
ls -l /dev/cuau0*
crw-rw-rw- 1 uucp dialer 0x30 Jan 21 18:55 /dev/cuau0
crw-rw---- 1 uucp dialer 0x31 Jan 21 18:55 /dev/cuau0.init
crw-rw---- 1 uucp dialer 0x32 Jan 21 18:55 /dev/cuau0.lock

Serial port permissions

https://chirp.danplanet.com/projects/ch ... irpOnLinux From this webpage is this explanation.

Note that you may need to add your users who want to use CHIRP to the group that owns the serial ports. This issue is often indicated by an "access denied" error when accessing serial port. First determine the USB port of your device, and then the following command should add your user to the proper group:
Note that "ttyUSB0" should be replaced with the actual device. /dev/cuau0 or /dev/cuau1 that identifies your connection to the radio and that "$USER" is a system variable that identifies the username of the individual running the command.

sudo usermod -a -G $(stat -c %G /dev/ttyUSB0) $USER
sudo usermod -a -G $(stat -c %G /dev/cuau0) $USER <---- This is for Linux

# find the $Sg group name for the /dev/cuau0 device or %Su user name
stat -f%Sg /dev/cuau0
dialer
sudo pw groupmod dialer -m fred <--- This is for FreeBSD, add user 'fred' to group 'dialers'
# To add a user to a group, use sudo pw groupmod <group> -m <username>


If that made a change, you will then need to log out and back in (or maybe even reboot) for it to take effect.



another way to allow 'others' access to read write a device .

Code: Select all

 chmod 666 /dev/cuaU0
I would try this method second.
If it works, great. Use Chirp Program to access those other channel.

Code: Select all

ls -l /dev/cuaU0
chown fred:fred /dev/cuau0    #  use change owner command to your logged in user name, in my case  owner fred : group fred
ls -l /dev/cuau0
I know this from recent experience using Manjaro Linux on a laptop and not being able to have 'chirp' program to program a Yaseu YT-65R handheld radio

https://chirp.danplanet.com/projects/ch ... i/Download Chirp Download Software

https://www.repeaterbook.com/index.php/en-us/ Ham radio repeater book ZM2
https://www.repeaterbook.com/repeaters/ ... te_id=none Select a State to view local repeaters.

Share back how you make a Linux program , 'Chirp', run on GhostBSD? Did you recompile from sources and have a native version of Chirp Software? CQ CQ de Wb7ody K Fred Finster https://ghostbsd-arm64.blogspot.com

for me Channel 1 146.52 Simplex 2M CALL ; Channel 2 446.0 Simplex 70 CALL easy for me to select check standard call frequencies.

USNCPOStoney, I don't have this all figured out. Could not find my USB to serial cable. So share the proper /dev/ttyUSB0 device name, maybe the USB vendor and product IDs for the Yaseu or other USB to serial cable, usbconfig list, usbconfig -d ugen0.3 dump_device_desc
Let me know how you installed and how to execute the chip python program on FreeBSD. Good job giving it a go.
USNCPOSharky
Posts: 15
Joined: Wed Jun 30, 2021 7:51 am

Re: [Errno 13] Permission denied: '/dev/cuaU0'

Post by USNCPOSharky »

Fred, Got it working!
Kudos Sir

Bonus Help
If you are like me and cant remember the EXACT syntax for your user name - you can use $ cat /etc/passwd to list the system users in FreeBSD

FreeBSD offers ports of Chirp in their repositories
https://www.freshports.org/comms/chirp

They also have a lot of other ham related software:
https://www.freebsdsoftware.org/comms/chirp.html
wb7odyfred
Posts: 188
Joined: Sat Nov 12, 2016 5:44 pm

[SOLVED] Re: [Errno 13] Permission denied: '/dev/cuaU0'

Post by wb7odyfred »

Okay will give it atest run soon as I can find my programming cable. Did you compile from ports or install binary package?

pkg search chirp
pkg install chirp
wb7odyfred
Posts: 188
Joined: Sat Nov 12, 2016 5:44 pm

[SOLVED] Re: [Errno 13] Permission denied: '/dev/cuaU0'

Post by wb7odyfred »

Okay will give it atest run soon as I can find my programming cable. Did you compile from ports or install binary package?

pkg search chirp
pkg install chirp
Post Reply