title: Access to /dev/ttyUSB0 denied for dialout group member in Kubuntu 18.04
body: <p>I'm trying to access an ESP32 microcontroller connected via USB to /dev/ttyUSB0 on my Kubuntu 18.04 machine, but I'm getting a permission denied error:</p>
  
  <blockquote>
    <p>SerialException: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'</p>
  </blockquote>
  
  <p>My username is in the <em>dialout</em> group in both <em>/etc/group</em> and <em>/etc/gshadow</em> and I have rebooted since adding the <em>dialout</em> group membership.</p>
  
  <pre><code>$ sudo grep dialout /etc/group /etc/gshadow
  /etc/group:dialout:x:20:steve
  /etc/gshadow:dialout:*::steve
  $ id -Gn steve
  steve adm dialout cdrom sudo dip plugdev lpadmin sambashare vboxusers libvirt libvirt-qemu libvirt-dnsmasq
  $ groups steve
  steve : steve adm dialout cdrom sudo dip plugdev lpadmin sambashare vboxusers libvirt libvirt-qemu libvirt-dnsmasq
  </code></pre>
  
  <p>The ownership and permissions of the /dev/ttyUSB0 file are:</p>
  
  <pre><code>crw-rw---- 1 root dialout 188, 0 Nov 17 22:34 /dev/ttyUSB0
  </code></pre>
  
  <p>So I would expect the <em>dialout</em> group membership to work.</p>
  
  <p>When I change the permissions on <em>/dev/ttyUSB0</em> to '666', giving world read/write access, I can access the serial port:</p>
  
  <pre><code>crw-rw-rw- 1 root dialout 188, 0 Nov 17 22:34 /dev/ttyUSB0
  </code></pre>
  
  <p>Although usable as a solution, access should work for <em>dialout</em> group members, but, based on my experiments above, it seems that the <em>dialout</em> group membership is somehow ineffective.</p>
  
  <p>This question is related to <em><a href="https://stackoverflow.com/questions/50858443/serial-port-permission-denied-for-non-root-user-with-dialout-group-privileges-ev">Serial port permission denied for non-root user with dialout group privileges even after reboot Ubuntu 18.04</a></em>, but with some extra points.</p>