Unable to change execute permissions of .sh file

11,221

The check boxes would be dis-appearing because you don't have appropriate permission as well as ownership to the file.. Try to make executable with the help of sudo command.

Try to change it by command line

  • Open terminal by Ctrl+Alt+T

  • Then reach to the jdk7.sh file.

    cd /home/gurung/Downloads
    

    if your file is locates in /home/gurung/Downloads or change accordingly.

  • Then execute following commands to make it executable:

    sudo chmod +x jdk7.sh
    

    if your file name is jdk7.sh or replace the file name with the original one.

That's it.. :)

Share:
11,221

Related videos on Youtube

kiri
Author by

kiri

♫ I'd love to change the world But I don't know what to do So I'll leave it up to you ♫

Updated on September 18, 2022

Comments

  • kiri
    kiri over 1 year

    I'm out with a new problem. I've downloaded a jdk7.sh file. Now I'm unable to change the permission of the file to allow executing the file as a program. I mark the check box and again it disappears.

    • kiri
      kiri over 10 years
      Is it on an NTFS partition? Where did you get this file from?
    • Eliah Kagan
      Eliah Kagan over 10 years
      Specifically, please see the "Scripts" section of this answer. To summarize for the case of your specific file: Assuming your file is named properly, sh jdk7.sh will run it normally and sudo sh jdk7.sh will run it as root (which might be necessary if its purpose is to create a systemwide installation of the Java Development Kit, accessible to all users). If the file starts with #!/bin/bash instead of #!/bin/sh, run bash jdk7.sh or sudo bash jdk7.sh. Note, the sourcing method in the other answer is not equivalent.
  • Saurav Kumar
    Saurav Kumar over 10 years
    The actual problem is how to solve the issue.. Not finding different ways..