You are trying to run the line echo "int64 num" > ..
in a directory where you have no write permissions. You can check with the command pwd
where you are: it's most likely something like /opt/ros/ROSVERSION/share/..
. Basically: anything outside your own home directory (/home/your_user_name/
) is typically off-limits for regular users.
If so, you'll want to setup a workspace (simply a directory where you can create your own package, in your home dir) and work from that.
See wiki/catkin/create_a_workspace for some more information.
Anyone has a solution to this? unfortunately i dont understand how the permission system in ubuntu works as i am newfag.
Then you might also benefit from reading a Linux beginner tutorial or two. It will really help you understand all the 'magic incantations' that are littered throughout the ROS tutorials & documentation.
For ROS itself, in addition to the tutorials you are already following, I'd recommend picking up a book. The wiki has a Books section which lists a few. Personally I like A Gentle Introduction To ROS. Teaches only the basics, but is really gentle.
Edit:
thank you gvdhoorn for your quick response and also for taking care of my other (duplicate) thread. i think my problem is as mig here describes. as i followed the tutorial i may have used sudo for creating my "beginnger_tutorials" folder. is it possible to change the permission of it afterwards?
If the beginner_tutorials
directory is somewhere in your home directory (so not in /opt/ros/..
), then you may fix the permissions using sudo chown USER: -R /path/to/beginner_tutorials
(where USER
is the name of your user). Note the :
.