0

i try to instal mavros in ros kinetic ubuntu 16.04, but i cannot install

$ ./install_geographiclib_datasets.sh
bash: ./install_geographiclib_datasets.sh: Permission denied

I tried:

sudo chmod -x ./install_geographiclib_datasets.sh

but it doesn't fix that permission. what should i do to fix this??

muru
  • 193,181
  • 53
  • 473
  • 722
  • 1
    `chmod -x` makes it executable, it doesn't change permissions. If the script is meant to be run as root you still have to use `sudo`. Try that and [edit] and update your question if necessary. –  Jan 10 '18 at 08:15
  • 2
    `chmod +x`, not `chmod -x`. – muru Jan 10 '18 at 09:19

1 Answers1

1

The fact that you had to do sudo chmod -x ./install_geographiclib_datasets.sh means the script has to be run using sudo. And like has been stated by MichaelBay the command chmod +x only adds the execute bit to the script but doesn't change the ownership which will determine who has permission to run it.

So run the script like so sudo ./install_geographiclib_datasets.sh, and it should go well.

Based on muru's splendid observation, you need to rerun sudo chmod +x ./install_geographiclib_datasets.sh, as sudo chmod -x removed the ability to execute that script.

George Udosen
  • 35,970
  • 13
  • 99
  • 121