user88381: I'm trying to upload anything to my Arduino Uno Wifi Rev2, I'm on Arch Linux, but I'm failing with the following error be it via IDEv2 or arduino-cli:

avrdude: usbdev_open(): cannot open device: Permission denied
avrdude: jtag3_open_common(): Did not find any device matching VID 0x03eb and PID list: 0x2145

The device permissions:
crw-rw-rw- 166,0 root uucp  9 Jan 23:22 /dev/ttyACM0

My udev rule:
KERNEL=="ttyACM[0-9]",MODE="0666",GROUP="uucp",TAG+="uaccess"

lsusb:
Bus 001 Device 005: ID 03eb:2145 Atmel Corp. ATMEGA328P-XMINI (CDC ACM)

First two entries from udevadm info -a -n /dev/ttyACM0:
  looking at device '/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1/tty/ttyACM0':
    KERNEL=="ttyACM0"
    SUBSYSTEM=="tty"
    DRIVER==""
    ATTR{power/control}=="auto"
    ATTR{power/runtime_active_time}=="0"
    ATTR{power/runtime_status}=="unsupported"
    ATTR{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1':
    KERNELS=="1-3:1.1"
    SUBSYSTEMS=="usb"
    DRIVERS=="cdc_acm"
    ATTRS{authorized}=="1"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceClass}=="02"
    ATTRS{bInterfaceNumber}=="01"
    ATTRS{bInterfaceProtocol}=="01"
    ATTRS{bInterfaceSubClass}=="02"
    ATTRS{bNumEndpoints}=="01"
    ATTRS{bmCapabilities}=="6"
    ATTRS{iad_bFirstInterface}=="01"
    ATTRS{iad_bFunctionClass}=="02"
    ATTRS{iad_bFunctionProtocol}=="01"
    ATTRS{iad_bFunctionSubClass}=="02"
    ATTRS{iad_bInterfaceCount}=="02"
    ATTRS{physical_location/dock}=="no"
    ATTRS{physical_location/horizontal_position}=="left"
    ATTRS{physical_location/lid}=="no"
    ATTRS{physical_location/panel}=="top"
    ATTRS{physical_location/vertical_position}=="upper"
    ATTRS{supports_autosuspend}=="1"

I feel like I've tried everything so far:

sudo chmod a+rw /dev/ttyACM0
sudo usermod -a -G uucp $USER
adding udev rule with all different configs (although if chown/chmod doesn't work what will it change??)
changing ownership to my user...
I checked the process for the IDE to make sure it runs on my user and it does
After all these steps I always either restarted and/or reloaded everything with sudo udevadm control --reload-rules && sudo udevadm trigger
Went through plethora of similar topics, no clues

I feel like I must be doing something awfully stupid here, it doesn't make any sense to me why it wouldn't work even after I chown'ed it to my user...

user70020: Looking at the board definition for the UNO WIFI R2, it doesn't use the serial port for upload. It's using an mdbg chip that it speaks to over a non-cdcacm USB protocol. Getting yourself into the group-owner for the serial device is good for communicating to the board through the serial monitor though.
The megaavr board package seems to come with a file for creating your udev rules that you should find at:
"${USER}/.arduino15/packages/arduino/hardware/megaavr/1.8.8/scripts/create_dfu_udev_rule"

The 1.8.8 subdirectory of megaavr is current as of writing. It will no doubt change. I still have 1.8.7 on my system.
Running it should create the necessary udev rule for allowing avrdude to speak directly to the USB device. Specifically they're adding this:
SUBSYSTEM=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="2145", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"

They seem to be creating a udev rule for the tty device as well, though that shouldn't strictly be necessary given what you've already done with becoming a member of the serial device's group. Basically you're doing it by becoming a member of the owning group where what they did was just open the device up to RW permissions for everyone.

88381: <p>I'm trying to upload anything to my Arduino Uno Wifi Rev2, I'm on Arch Linux, but I'm failing with the following error be it via IDEv2 or <code>arduino-cli</code>:</p>
<blockquote>
<p>avrdude: usbdev_open(): cannot open device: Permission denied</p>
<p>avrdude: jtag3_open_common(): Did not find any device matching VID 0x03eb and PID list: 0x2145</p>
</blockquote>
<p>The device permissions:</p>
<pre><code>crw-rw-rw- 166,0 root uucp  9 Jan 23:22 /dev/ttyACM0
</code></pre>
<p>My udev rule:</p>
<pre><code>KERNEL==&quot;ttyACM[0-9]&quot;,MODE=&quot;0666&quot;,GROUP=&quot;uucp&quot;,TAG+=&quot;uaccess&quot;
</code></pre>
<p><code>lsusb</code>:</p>
<pre><code>Bus 001 Device 005: ID 03eb:2145 Atmel Corp. ATMEGA328P-XMINI (CDC ACM)
</code></pre>
<p>First two entries from <code>udevadm info -a -n /dev/ttyACM0</code>:</p>
<pre><code>  looking at device '/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1/tty/ttyACM0':
    KERNEL==&quot;ttyACM0&quot;
    SUBSYSTEM==&quot;tty&quot;
    DRIVER==&quot;&quot;
    ATTR{power/control}==&quot;auto&quot;
    ATTR{power/runtime_active_time}==&quot;0&quot;
    ATTR{power/runtime_status}==&quot;unsupported&quot;
    ATTR{power/runtime_suspended_time}==&quot;0&quot;

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1':
    KERNELS==&quot;1-3:1.1&quot;
    SUBSYSTEMS==&quot;usb&quot;
    DRIVERS==&quot;cdc_acm&quot;
    ATTRS{authorized}==&quot;1&quot;
    ATTRS{bAlternateSetting}==&quot; 0&quot;
    ATTRS{bInterfaceClass}==&quot;02&quot;
    ATTRS{bInterfaceNumber}==&quot;01&quot;
    ATTRS{bInterfaceProtocol}==&quot;01&quot;
    ATTRS{bInterfaceSubClass}==&quot;02&quot;
    ATTRS{bNumEndpoints}==&quot;01&quot;
    ATTRS{bmCapabilities}==&quot;6&quot;
    ATTRS{iad_bFirstInterface}==&quot;01&quot;
    ATTRS{iad_bFunctionClass}==&quot;02&quot;
    ATTRS{iad_bFunctionProtocol}==&quot;01&quot;
    ATTRS{iad_bFunctionSubClass}==&quot;02&quot;
    ATTRS{iad_bInterfaceCount}==&quot;02&quot;
    ATTRS{physical_location/dock}==&quot;no&quot;
    ATTRS{physical_location/horizontal_position}==&quot;left&quot;
    ATTRS{physical_location/lid}==&quot;no&quot;
    ATTRS{physical_location/panel}==&quot;top&quot;
    ATTRS{physical_location/vertical_position}==&quot;upper&quot;
    ATTRS{supports_autosuspend}==&quot;1&quot;
</code></pre>
<p>I feel like I've tried everything so far:</p>
<ul>
<li><code>sudo chmod a+rw /dev/ttyACM0</code></li>
<li><code>sudo usermod -a -G uucp $USER</code></li>
<li>adding udev rule with all different configs (although if chown/chmod doesn't work what will it change??)</li>
<li>changing ownership to my user...</li>
<li>I checked the process for the IDE to make sure it runs on my user and it does</li>
<li>After all these steps I always either restarted and/or reloaded everything with <code>sudo udevadm control --reload-rules &amp;&amp; sudo udevadm trigger</code></li>
<li>Went through plethora of similar topics, no clues</li>
</ul>
<p>I feel like I must be doing something awfully stupid here, it doesn't make any sense to me why it wouldn't work even after I chown'ed it to my user...</p>
 70020: <p>Looking at the board definition for the UNO WIFI R2, it doesn't use the serial port for upload. It's using an mdbg chip that it speaks to over a non-cdcacm USB protocol. Getting yourself into the group-owner for the serial device is good for communicating to the board through the serial monitor though.</p>
<p>The megaavr board package seems to <a href="https://github.com/arduino/ArduinoCore-megaavr/blob/1.8.8/scripts/create_dfu_udev_rule" rel="nofollow noreferrer">come with a file</a> for creating your udev rules that you should find at:</p>
<pre class="lang-sh prettyprint-override"><code>&quot;${USER}/.arduino15/packages/arduino/hardware/megaavr/1.8.8/scripts/create_dfu_udev_rule&quot;
</code></pre>
<p>The 1.8.8 subdirectory of megaavr is current as of writing. It will no doubt change. I still have 1.8.7 on my system.</p>
<p>Running it should create the necessary udev rule for allowing avrdude to speak directly to the USB device. Specifically they're adding this:</p>
<pre><code>SUBSYSTEM==&quot;usb&quot;, ATTR{idVendor}==&quot;03eb&quot;, ATTR{idProduct}==&quot;2145&quot;, MODE=&quot;0666&quot;, ENV{ID_MM_DEVICE_IGNORE}=&quot;1&quot;
</code></pre>
<p>They seem to be creating a udev rule for the tty device as well, though that shouldn't strictly be necessary given what you've already done with becoming a member of the serial device's group. Basically you're doing it by becoming a member of the owning group where what they did was just open the device up to RW permissions for everyone.</p>
