Ask Your Question
0

Tutorial Using msg

asked 2015-07-26 14:39:05 -0500

Che. gravatar image

updated 2015-07-27 01:32:28 -0500

gvdhoorn gravatar image

When I try to follow the tutorial step

$echo "int64 num" > msg/Num.msg

i get bash:

msg/Num.msg: no permission

Anyone has a solution to this? unfortunately i dont understand how the permission system in ubuntu works as i am newfag.

thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-07-27 01:58:59 -0500

gvdhoorn gravatar image

updated 2015-07-27 03:13:22 -0500

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 :.

edit flag offensive delete link more

Comments

1

as a minor addition: You might also have no permissions if you created this file using sudo touch msg/Num.msg. You can check with ls -l msg/Num.msg what the permissions are. See here for more info.

mgruhler gravatar image mgruhler  ( 2015-07-27 02:28:20 -0500 )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?

Che. gravatar image Che.  ( 2015-07-27 03:06:44 -0500 )edit

that worked, thank you! have a beer on me. so chown USER makes USER the new owner of that directory with RXW-Permissions? can i change the status to "solved" for the thread or something like that?

Che. gravatar image Che.  ( 2015-07-27 03:33:36 -0500 )edit

Yes. chown == CHange OWNer. The permissions are not changed, just the owner.

can i change the status to "solved" for the thread or something like that?

Yes.

gvdhoorn gravatar image gvdhoorn  ( 2015-07-27 03:59:29 -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

Stats

Asked: 2015-07-26 14:39:05 -0500

Seen: 116 times

Last updated: Jul 27 '15