Ask Your Question

rosdep update Permission error

asked 2014-06-28 14:29:15 -0500

thursday gravatar image

updated 2014-06-30 04:21:26 -0500

demmeln gravatar image

Hi there, can't figure this out.

After following this to the letter:

I am now trying to follow this:

Running 'rosdep update' does not work. I keep getting a permission error regarding some temporary pickle files in .ros/rosdep/sources.cache . I have tried setting all files in that directory to have all permissions for others but this has not worked. I've tried purging, reinstalling, etc, doesn't work. I cannot find a process that fixes this.

Any help at all would be greatly appreciated. Below is a complete error readout:

thursday@daedalus:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d

ERROR: Rosdep experienced an error: [Errno 13] Permission denied: '/home/thursday/.ros/rosdep/sources.cache/5f44c73fb5a0e187f088839519d453ff8aa3699e.pickle.tmp.UGtFKu'
Please go to the rosdep page [1] and file a bug report with the stack trace below.

rosdep version: 0.10.27

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/rosdep2/", line 121, in rosdep_main
    exit_code = _rosdep_main(args)
  File "/usr/lib/pymodules/python2.7/rosdep2/", line 277, in _rosdep_main
    return _no_args_handler(command, parser, options, args)
  File "/usr/lib/pymodules/python2.7/rosdep2/", line 285, in _no_args_handler
    return command_handlers[command](options)
  File "/usr/lib/pymodules/python2.7/rosdep2/", line 456, in command_update
  File "/usr/lib/pymodules/python2.7/rosdep2/", line 423, in update_sources_list
    retval.append((source, write_cache_file(sources_cache_dir, source.url, rosdep_data)))
  File "/usr/lib/pymodules/python2.7/rosdep2/", line 495, in write_cache_file
    write_atomic(filepath + PICKLE_CACHE_EXT, pickle.dumps(rosdep_data, -1), True)
  File "/usr/lib/pymodules/python2.7/rosdep2/", line 504, in write_atomic
    fd, filepath_tmp = tempfile.mkstemp(prefix=os.path.basename(filepath) + '.tmp.', dir=os.path.dirname(filepath))
  File "/usr/lib/python2.7/", line 300, in mkstemp
    return _mkstemp_inner(dir, prefix, suffix, flags)
  File "/usr/lib/python2.7/", line 235, in _mkstemp_inner
    fd =, flags, 0600)
OSError: [Errno 13] Permission denied: '/home/thursday/.ros/rosdep/sources.cache/5f44c73fb5a0e187f088839519d453ff8aa3699e.pickle.tmp.UGtFKu'

For further reference here are what some file permissions look like in folders that may have something to do with this:

thursday@daedalus:~$ sudo ls -la /etc/ros/rosdep/sources.list.d
[sudo] password for thursday: 
total 12
drwxr-xr-x 2 root root 4096 Jun 28 12:02 .
drwxr-xr-x 3 root root 4096 Jun 28 12:02 ..
-rw-r--r-- 1 root root  533 Jun 28 12:02 20-default.list


thursday@daedalus:~$ sudo ls -la /home/thursday/.ros/rosdep
total 12
drwxr-xr-x 3 root root 4096 Jun 28 11:36 .
drwxr-xr-x 4 root root 4096 Jun 28 11:34 ..
drwxr-xr-x 2 root root 4096 Jun 28 11:36 sources.cache

/// This is where i tried making all these files read/write for all groups. How do you give something the 'd' permission?

thursday@daedalus:~$ sudo ls -la /home/thursday/.ros/rosdep/sources.cache
total 720
drwxr-xr-x 2 root root   4096 ...
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-06-30 04:24:08 -0500

demmeln gravatar image

updated 2014-07-01 05:20:51 -0500

Changing ownership of the ~/.ros directory is the correct fix. rosdep recently go a fix-permissions verb that does exactly that and improves the error message, but it has not been released yet, so for now it is easiest to do it manually as @Mehdi Tlili suggests.

Edit: rosdep has been re-released, so if you update it from pip/apt, you shoul have gotten a more useful error message that indicates to run sudo rosdep fix-permissions

edit flag offensive delete link more

answered 2014-06-29 20:03:13 -0500

Mehdi. gravatar image

updated 2014-06-29 23:56:11 -0500

I think the problem is that those files belong to "root". Go to /home/thursday and try to execute this :

sudo chown -R thursday:thursday .ros

I am not sure to which group your user name belongs to but in most cases I think that username and group are the same. If not replace the second thursday by your group name. This was a fix that worked for me, I am not sure if it is the best way to do things.

edit flag offensive delete link more


This worked! Thank you so much. Side note: had no idea that files/directories have owners in linux. Hooray for learning!

thursday gravatar image thursday  ( 2014-06-30 19:53:45 -0500 )edit

You're welcome. Can you please accept the answer to mark the question as answered.

Mehdi. gravatar image Mehdi.  ( 2014-06-30 20:11:55 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-06-28 14:29:15 -0500

Seen: 4,274 times

Last updated: Jul 01 '14