ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Why do I get Permission denied for pid file when launching roscore

asked 2020-02-17 11:01:45 -0500

EcoRon gravatar image

Hi,

I installed ros on a Xenial box, initialized the environment but get the following when I try to start roscore:

osboxes@osboxes:~$ roscore  Traceback (most recent call last):   File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 257, in main
    write_pid_file(options.pid_fn, options.core, options.port)   File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 110, in write_pid_file
    with open(pid_fn, "w") as f: IOError: [Errno 13] Permission denied: '/home/osboxes/.ros/roscore-11311.pid'

even though:

osboxes@osboxes:~$ ls -l /home/osboxes/.ros/roscore-11311.pid
-rw-r--r-- 1 root root 5 Feb 16 20:28 /home/osboxes/.ros/roscore-11311.pid

the user has r&w access to the file, what's wrong, am I missing something?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-02-17 11:05:27 -0500

gvdhoorn gravatar image

updated 2020-02-17 11:05:55 -0500

The file appears to be owned by root, even though you're not root yourself. As the access mask is -rw-r--r--, this means that no user other than root is allowed to write to it. That would explain the error.

What is the output of whoami?

Have you ever run ROS nodes as root? With sudo perhaps? Or ran sudo rosdep update?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-02-17 11:01:45 -0500

Seen: 404 times

Last updated: Feb 17 '20