I ran into a permissions issue flashing an update to my 3D printer “Prusa MK3S+” on Arch Linux and the fix was easier than expected.
For background, this is my first time doing this so I wasn’t too sure about the procedure, the printer beeped before print to let me know there’s newer firmware available and I should upgrade. I checked online and found these instructions on the Prusa help site for how to flash firmware. It seems easy enough:
- Connect the printer to the laptop with USB
- Go to Menu → Configuration → Flash printer firmware
- choose the .hex file you downloaded from the Prusa website
that’s it!
However, when I clicked the “Flash!” button I got the following error message from the flasher’s log output:
avrdude-slic3r: ser_open(): can't open device "/dev/ttyACM0": Permission denied
avrdude-slic3r: Could not open port: /dev/ttyACM0
OK, so there’s some sort of permission issue when trying to connect to the printer via the serial port. The Firmware Updating Issues page on the Prusa help site doesn’t mention such an issue, so let’s figure it out ourselves.
% ls -l /dev/ttyACM0
crw-rw---- 1 root uucp 166, 0 May 11 20:26 /dev/ttyACM0
So the file has read and write permissions rw- for the user who owns it, and also their group, but not others. The user is root and the group is uucp, so I need to know if I’m in that group, because if not then I won’t be able to access this file at all. I know groups lists my user’s groups, but I can never recall the command for managing groups because after installation I only rarely need it. It’s quick to look it up in the Arch wiki: Users and groups > Group management.
% groups
scanner cups realtime video lp audio wheel sion
This lists the groups I’m in, and although there are several, uucp isn’t one of them, so let’s fix that. The -a flag for gpasswd is short for --add, for adding a user to a group:
% sudo gpasswd -a sion uucp
Re-running groups shows no difference, because it doesn’t affect the current session, but after logging out and in again you can see, I’m now in uucp:
% groups
scanner cups realtime video uucp lp audio wheel sion
After this, re-opening the Prusa Slicer software and re-running the flashing dialogue everything works as expected, hurray!
Why not alternative solutions?
You may have considered changing ownership (chown) of this file to your own user or adding read-write permissions for other users (chmod) but I’d discourage that:
- For
chownother software that manages this file might lose its ability to do so - For
chmodadding universal access like this can be a security issue on a shared system (less relevant in this case because it’s my own single-user PC) - In both cases it becomes harder with time to manage ad-hoc file permissions of system files by hand
- As far as I can tell this is a short-lived file that’s created as a serial socket when you connect the printer, so if you disconnect and reconnect you’d get a new one and you’d have to redo the permission changes every single time
On the other hand adding your user to the right group conveniently solves this for all future connections.
Update: It is 2025 and the “Firmware updating issues” Prusa help page now mentions “Permission denied” as a common flashing problem for Linux but it tells you to add your user to the dialout group. I suppose that might be the name used by software that creates this file on popular mainstream distros like Ubuntu, but on Arch Linux it seems you’ll need to use the uucp group.