Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
#!/bin/env/perl -w
or maybe:
#!/usr/bin/env perl -w
Note: I have never heard of a "GuruPlug" so forgive me if this doesn't apply; and, I don't typically do this, so my syntax may be slightly adrift, but the point I'm trying to indicate is to use the `env` capability to locate the proper interpreter..
Last edited by GrapefruiTgirl; 07-23-2010 at 10:17 AM.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.