“No such file or directory” after chmod












1















I downloaded my professor's "shell" program and am trying to run it on my machine to do some homework. When I tried to run it from terminal using ./shell I got a "Permission denied error". After running chmod 777 shell I tried runninging it again, only to get the "no such file or directory" error. I'm not sure why this is happening as I can still see the executable using ls. When I check the permissions of shell I get -rwxrwxrwx 1 ubuntu ubuntu 9403 Feb 16 03:45 shell so I'm not sure what the matter is. Can someone help me get this thing running?



Output of file ./shell:



./shell: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped


Output of uname -a:



Linux ubuntu 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux









share|improve this question
















bumped to the homepage by Community 10 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    Perhaps you are on a 64-bit system and the executable is a 32-bit one? In that case you need to install additional packages in order to run it.

    – fkraiem
    Feb 16 '16 at 20:10











  • @fkraiem - shell scripts are not 32 or 64 bit. compiled binaries will (usually) give ELF errors.

    – Panther
    Feb 16 '16 at 20:11











  • @muru I edited the posting, it's at the bottom.

    – Adam
    Feb 16 '16 at 20:12











  • @bodhi.zazen This is not a shell script. And, no.

    – fkraiem
    Feb 16 '16 at 20:13






  • 1





    @Serg That's because the error for a missing ELF interpreter is the same as that for a missing file. See man 2 execve, look up ENOENT. So, if /lib/ld-linux.so can't handle 32-bit executables, that's the error you'll get. Adam, try installing gcc-multilib.

    – muru
    Feb 17 '16 at 2:13


















1















I downloaded my professor's "shell" program and am trying to run it on my machine to do some homework. When I tried to run it from terminal using ./shell I got a "Permission denied error". After running chmod 777 shell I tried runninging it again, only to get the "no such file or directory" error. I'm not sure why this is happening as I can still see the executable using ls. When I check the permissions of shell I get -rwxrwxrwx 1 ubuntu ubuntu 9403 Feb 16 03:45 shell so I'm not sure what the matter is. Can someone help me get this thing running?



Output of file ./shell:



./shell: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped


Output of uname -a:



Linux ubuntu 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux









share|improve this question
















bumped to the homepage by Community 10 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    Perhaps you are on a 64-bit system and the executable is a 32-bit one? In that case you need to install additional packages in order to run it.

    – fkraiem
    Feb 16 '16 at 20:10











  • @fkraiem - shell scripts are not 32 or 64 bit. compiled binaries will (usually) give ELF errors.

    – Panther
    Feb 16 '16 at 20:11











  • @muru I edited the posting, it's at the bottom.

    – Adam
    Feb 16 '16 at 20:12











  • @bodhi.zazen This is not a shell script. And, no.

    – fkraiem
    Feb 16 '16 at 20:13






  • 1





    @Serg That's because the error for a missing ELF interpreter is the same as that for a missing file. See man 2 execve, look up ENOENT. So, if /lib/ld-linux.so can't handle 32-bit executables, that's the error you'll get. Adam, try installing gcc-multilib.

    – muru
    Feb 17 '16 at 2:13
















1












1








1


1






I downloaded my professor's "shell" program and am trying to run it on my machine to do some homework. When I tried to run it from terminal using ./shell I got a "Permission denied error". After running chmod 777 shell I tried runninging it again, only to get the "no such file or directory" error. I'm not sure why this is happening as I can still see the executable using ls. When I check the permissions of shell I get -rwxrwxrwx 1 ubuntu ubuntu 9403 Feb 16 03:45 shell so I'm not sure what the matter is. Can someone help me get this thing running?



Output of file ./shell:



./shell: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped


Output of uname -a:



Linux ubuntu 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux









share|improve this question
















I downloaded my professor's "shell" program and am trying to run it on my machine to do some homework. When I tried to run it from terminal using ./shell I got a "Permission denied error". After running chmod 777 shell I tried runninging it again, only to get the "no such file or directory" error. I'm not sure why this is happening as I can still see the executable using ls. When I check the permissions of shell I get -rwxrwxrwx 1 ubuntu ubuntu 9403 Feb 16 03:45 shell so I'm not sure what the matter is. Can someone help me get this thing running?



Output of file ./shell:



./shell: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped


Output of uname -a:



Linux ubuntu 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux






command-line permissions chmod






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 16 '16 at 20:17









muru

1




1










asked Feb 16 '16 at 19:59









AdamAdam

15629




15629





bumped to the homepage by Community 10 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 10 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    Perhaps you are on a 64-bit system and the executable is a 32-bit one? In that case you need to install additional packages in order to run it.

    – fkraiem
    Feb 16 '16 at 20:10











  • @fkraiem - shell scripts are not 32 or 64 bit. compiled binaries will (usually) give ELF errors.

    – Panther
    Feb 16 '16 at 20:11











  • @muru I edited the posting, it's at the bottom.

    – Adam
    Feb 16 '16 at 20:12











  • @bodhi.zazen This is not a shell script. And, no.

    – fkraiem
    Feb 16 '16 at 20:13






  • 1





    @Serg That's because the error for a missing ELF interpreter is the same as that for a missing file. See man 2 execve, look up ENOENT. So, if /lib/ld-linux.so can't handle 32-bit executables, that's the error you'll get. Adam, try installing gcc-multilib.

    – muru
    Feb 17 '16 at 2:13
















  • 1





    Perhaps you are on a 64-bit system and the executable is a 32-bit one? In that case you need to install additional packages in order to run it.

    – fkraiem
    Feb 16 '16 at 20:10











  • @fkraiem - shell scripts are not 32 or 64 bit. compiled binaries will (usually) give ELF errors.

    – Panther
    Feb 16 '16 at 20:11











  • @muru I edited the posting, it's at the bottom.

    – Adam
    Feb 16 '16 at 20:12











  • @bodhi.zazen This is not a shell script. And, no.

    – fkraiem
    Feb 16 '16 at 20:13






  • 1





    @Serg That's because the error for a missing ELF interpreter is the same as that for a missing file. See man 2 execve, look up ENOENT. So, if /lib/ld-linux.so can't handle 32-bit executables, that's the error you'll get. Adam, try installing gcc-multilib.

    – muru
    Feb 17 '16 at 2:13










1




1





Perhaps you are on a 64-bit system and the executable is a 32-bit one? In that case you need to install additional packages in order to run it.

– fkraiem
Feb 16 '16 at 20:10





Perhaps you are on a 64-bit system and the executable is a 32-bit one? In that case you need to install additional packages in order to run it.

– fkraiem
Feb 16 '16 at 20:10













@fkraiem - shell scripts are not 32 or 64 bit. compiled binaries will (usually) give ELF errors.

– Panther
Feb 16 '16 at 20:11





@fkraiem - shell scripts are not 32 or 64 bit. compiled binaries will (usually) give ELF errors.

– Panther
Feb 16 '16 at 20:11













@muru I edited the posting, it's at the bottom.

– Adam
Feb 16 '16 at 20:12





@muru I edited the posting, it's at the bottom.

– Adam
Feb 16 '16 at 20:12













@bodhi.zazen This is not a shell script. And, no.

– fkraiem
Feb 16 '16 at 20:13





@bodhi.zazen This is not a shell script. And, no.

– fkraiem
Feb 16 '16 at 20:13




1




1





@Serg That's because the error for a missing ELF interpreter is the same as that for a missing file. See man 2 execve, look up ENOENT. So, if /lib/ld-linux.so can't handle 32-bit executables, that's the error you'll get. Adam, try installing gcc-multilib.

– muru
Feb 17 '16 at 2:13







@Serg That's because the error for a missing ELF interpreter is the same as that for a missing file. See man 2 execve, look up ENOENT. So, if /lib/ld-linux.so can't handle 32-bit executables, that's the error you'll get. Adam, try installing gcc-multilib.

– muru
Feb 17 '16 at 2:13












1 Answer
1






active

oldest

votes


















0














chmod +x <name of shell script>


is something you need to do to execute this shell script. What are the contents of the shell scripts. May be the "no such file or directory" error is coming from some command/action within the shell script. Please share the contents of the shell script or execute them one by one (one at a time) to find out which one is causing "no such file or directory" error.






share|improve this answer


























  • I was just given an executable, the professor wants us to implement something similar by ourselves and so hasn't give us the source code.

    – Adam
    Feb 16 '16 at 20:06











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f735495%2fno-such-file-or-directory-after-chmod%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














chmod +x <name of shell script>


is something you need to do to execute this shell script. What are the contents of the shell scripts. May be the "no such file or directory" error is coming from some command/action within the shell script. Please share the contents of the shell script or execute them one by one (one at a time) to find out which one is causing "no such file or directory" error.






share|improve this answer


























  • I was just given an executable, the professor wants us to implement something similar by ourselves and so hasn't give us the source code.

    – Adam
    Feb 16 '16 at 20:06
















0














chmod +x <name of shell script>


is something you need to do to execute this shell script. What are the contents of the shell scripts. May be the "no such file or directory" error is coming from some command/action within the shell script. Please share the contents of the shell script or execute them one by one (one at a time) to find out which one is causing "no such file or directory" error.






share|improve this answer


























  • I was just given an executable, the professor wants us to implement something similar by ourselves and so hasn't give us the source code.

    – Adam
    Feb 16 '16 at 20:06














0












0








0







chmod +x <name of shell script>


is something you need to do to execute this shell script. What are the contents of the shell scripts. May be the "no such file or directory" error is coming from some command/action within the shell script. Please share the contents of the shell script or execute them one by one (one at a time) to find out which one is causing "no such file or directory" error.






share|improve this answer















chmod +x <name of shell script>


is something you need to do to execute this shell script. What are the contents of the shell scripts. May be the "no such file or directory" error is coming from some command/action within the shell script. Please share the contents of the shell script or execute them one by one (one at a time) to find out which one is causing "no such file or directory" error.







share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 16 '16 at 20:06









Rinzwind

206k28395527




206k28395527










answered Feb 16 '16 at 20:03









AshuAshu

2,58241639




2,58241639













  • I was just given an executable, the professor wants us to implement something similar by ourselves and so hasn't give us the source code.

    – Adam
    Feb 16 '16 at 20:06



















  • I was just given an executable, the professor wants us to implement something similar by ourselves and so hasn't give us the source code.

    – Adam
    Feb 16 '16 at 20:06

















I was just given an executable, the professor wants us to implement something similar by ourselves and so hasn't give us the source code.

– Adam
Feb 16 '16 at 20:06





I was just given an executable, the professor wants us to implement something similar by ourselves and so hasn't give us the source code.

– Adam
Feb 16 '16 at 20:06


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f735495%2fno-such-file-or-directory-after-chmod%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How did Captain America manage to do this?

迪纳利

南乌拉尔铁路局