shabang lines don't work on my guru plug
I have a GuruPlug computer running Debian Lenny.
I put a perl script on it with the following shabang line. #!/root/bin/perl -w When I run the program from the command line I get the following message. guru:~/bin$ ./ms_sync.pl -bash: ./ms_sync.pl: /root/bin/perl: bad interpreter: Permission denied The permissions are: guru:~/bin$ ls -al ms_sync.pl -rwxr----- 1 ms users 11772 2010-06-17 10:48 ms_sync.pl When I run 'which perl' the path I used is confirmed. This perl script works on several other debian computer. I can run perl and I can invoke the script as an arg to perl like this: guru:~/bin$ perl ms_sync.pl Which works fine. I think this has something to do with the way the root partition is mounted. However, there seems to be a little guru black magic going on to get the root partition mounted since it isn't in /etc/fstab. If I enter mount on the command line I find the following line. rootfs on / type rootfs (rw) I cannot tell how it is mounted. bash, perl, python, etc work but they all have this problem when invoked via a shebang line. How can I get shebang lines to work? Thank you, Marc |
Any chance the following works as a shebang?
Code:
#!/bin/env/perl -w |
Hi msrk wel-come to LQ,
try as shebang #!/usr/bin/perl |
Thank you all for the suggestions. After trying:
#!/bin/env/perl -w It occurred to me that the problem may be the mount permissions of the disk holding the perl script rather than the disk holding perl itself. I was right. I had the 'noexec' option turned on. I remounted the disk without that directive and all is well. |
Cool :) glad you found the problem. If you haven't yet, you could mark this [solved] using Thread Tools, from the menu near the top.
|
All times are GMT -5. The time now is 02:28 AM. |