bash: ./program: permission denied
I'm trying to open a program.
I've tried: ./program sudo ./program sh ./program sudo sh ./program sudo chmod 777 program sudo chmod a+rwx program sudo chmod a+rwX program But none of these work. At one time I was able to just click the program to open it, but I messed that up by changing the file association to sh. Now the 'execute' option is gone. Any help on a way to fix this would be greatly appreciated. I'm using Xubuntu (Ubuntu) 7.04, and the program is called mupen64. |
Are you trying to open a file? Or to run a program? I assume that you meant to run a program.
1. Make sure that the program is in your current directory by entering 'ls -l' at the command prompt. 2. If the command is there then make sure that is has 'execute' attribute, if not then chmod +x program 3. It should be any messages about permission denied, and you don't need to do any 'sudo ...' (BTW: if you insist on doing 'sudo' make sure that permissions in 'sudoers' file are set correclty) 4. If the 'program' is bash script then the first line should read: #!/bin/bash 5. If the program is a script you could run it as by entering: >source program |
rsashok brings up a good point of knowing what type of file it is you're trying to execute. You can do this with the "file" command. Some examples from my system:
Code:
$ file /bin/ls |
Thank you for the replies!
chmod +x file worked, but it only did when I moved the program from my xfs sda4 partition to my ext3 home folder. Here is the output for the file command: Code:
file mupen64 |
All times are GMT -5. The time now is 01:10 AM. |