Ros hydro serial permission denied

396 views
Skip to first unread message

Galo Maldonado

unread,
Mar 5, 2014, 3:17:06 AM3/5/14
to ros-by-...@googlegroups.com
I am using ros hydro in ubuntu 12.04 precise.

Now, I am trying to check my servos status. I have everything connected (servo to supply as described in the book and USB2Dynamixel). I have ttl selected and when I check usb port I get /dev/ttyUSB0 but when I run $ arbotix_terminal /dev/ttyUSB0 1000000 I get this in the terminal: SerialException: could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'.

Any hint of what is missing?
Thank you in advance.


James Nugen

unread,
Mar 5, 2014, 4:41:47 AM3/5/14
to ros-by-...@googlegroups.com
Make sure that your user is a member of the "dialout" group.  You can check by running the 'groups' command.
If not, add the user to the group by running:
sudo adduser $USER dialout (where $USER is your user name)
newgrp dialout (this will reload the permissions for dialout group)

Hope this helps!
James Nugen



--
You received this message because you are subscribed to the Google Groups "ros-by-example" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-by-exampl...@googlegroups.com.
Visit this group at http://groups.google.com/group/ros-by-example.
For more options, visit https://groups.google.com/groups/opt_out.

Galo Maldonado

unread,
Mar 5, 2014, 11:34:55 AM3/5/14
to ros-by-...@googlegroups.com
First thanks for your answer, I am in the dialout group.I put this to verify my user name:
 $ whoami
And then i found my name in dialout group by typing this:
 $ groups
I also tried to reload the permissions as you mentioned but then I need to insert a password which is not the same one I use as admin.

What else should I do?


Patrick Goebel

unread,
Mar 5, 2014, 8:07:18 PM3/5/14
to ros-by-...@googlegroups.com
Hi Galo,

You can check the permissions of the serial port as follows:

$ ls -l /dev/ttyUSB0
crw-rw-rw- 1 patrick dialout 188, 0 Mar 5 16:04 /dev/ttyUSB0

As you can see in my case, I am both the owner and a member of the
dialout group and both I and the group have rw permissions. It should
be enough for the dialout group to have permissions rw as long as you
are a member of the dialout group.

--patrick

Galo Maldonado

unread,
Mar 6, 2014, 5:02:23 AM3/6/14
to ros-by-...@googlegroups.com
Thank you it helped me, now I can control the dynamixel motors, this is what I did:
#  check usb connection
$ ls /dev/ttyUSB*
# look for my user name
$ whoami
# verify if I am part of dialout group
$ groups
# once verified (otherwise add user to group)
# verify permissions
$ ls -l /dev/ttyUSB0
# in my case root gives permissions
# so change to my user_name
$ sudo chown user_name /dev/ttyUSB0
# chown command changes the user_name and/or group ownership for given file
$ chmod 0600 /dev/ttyUSB0
# chmod command change the access mode to the file.
# verify again
$ ls -l /dev/ttyUSB0
# now user_name has permissions

Reply all
Reply to author
Forward
0 new messages