Accessing PL2303 USB serial adapter as non-root user

If you plug the PL2303 USB to serial adapter (or any other FTDI-like USB adapter) into your USB port, udev creates a /dev/ttyUSBX device with limited read and write permissions (0660 per default). Usually, only the root user and a specific group can access the device at all . To access the device as a regular user, you can either become a member of that group (distribution specific, dialout on fedora) or tell udev to create the device with different read and write permissions.

Become a member of dialout

Simply run

# usermod -a -G groupname username

to add the user username to the group groupname. To verify, that a certain user is a member of a specific group, you can grep the file /etc/group for a user name

# grep username /etc/group

Note that you have to re-login for this changes to take effect.

Create the device with different permissions

Alternatively, you can tell udev to create the /dev/ttyUSBX device with different read and write permissions. Add a udev rule to /etc/udev/rules.d/, e.g. /etc/udev/rules.d/85-PL2303SerialPort.rules with the following content:

ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", MODE="0666"

You can get the vendor and product id from lsusb or by looking at /var/log/messages when you plug in the device.

After saving the new udev rule, tell udev to reload it’s ruleset

# udevadm control --reload-rules

and eventually plug in your adapter.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.