0
$\begingroup$

Rosanswers logo

Hi Everyone, total noob here...

I've run into a problem while trying to use ROS on Ubuntu 12.04. I installed it according to the instructions on the website and the installation seemed to have gone well, but I am unable to build a catkin workspace. I tried rebooting and even installing catkin again but nothing. Terminal (over ssh to my Macbook Pro) continuously gives me the error:

administrator@ROS:~/catkin_ws/src$ catkin_init_workspace Could neither symlink nor copy file "/opt/ros/hydro/share/catkin/cmake/toplevel.cmake" to "/home/administrator/catkin_ws/src/CMakeLists.txt":

  • [Errno 13] Permission denied
  • [Errno 13] Permission denied: '/home/administrator/catkin_ws/src/CMakeLists.txt

and if I login as root and attempt, I get:

root@ROS:~# cd ~/catkin_ws/src root@ROS:~/catkin_ws/src# catkin_init_workspace catkin_init_workspace: command not found root@ROS:~/catkin_ws/src#

(ROS is the name of my Ubuntu machine).

I'm pretty sure its something really simple that I'm missing (first time with row), but any help is appreciated. Thanks in Advance! Mr_E


Originally posted by mr_electric on ROS Answers with karma: 1 on 2013-12-29

Post score: 0


Original comments

Comment by mr_electric on 2013-12-29:
I first tried as a regular user, but it still did not allow me to access the file. Would deleting the directory I created be sufficient to fix the permissions, or will I have to do a full reinstall?

Thanks for your help!!

Mr_E

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

You should do everything in the tutorials as non root user. If you use a root user when doing operations the files generated will be owned by root and other users will not have permissions to access those files. Which will give you Permission denied errors like above.

You should clear the workspace and do everything as a non root user.


Originally posted by tfoote with karma: 58457 on 2013-12-29

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by tfoote on 2013-12-29:
Please use comments for questions. Yes you need to delete the whole directory as root. (~/catkin_ws)

$\endgroup$
0
$\begingroup$

Rosanswers logo

delete the folder you just created and mkdir new folder without sudo in front.


Originally posted by enyen with karma: 11 on 2014-11-02

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by defelix on 2017-07-05:
I want to backup this short but important tip: using mkdir with sudo puts you on the wrong path. When you later source files into that directory, you may get "permission denied" errors. If that's the case - you may want to change permissions on the directory: https://ss64.com/bash/chmod.html

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.