Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
02-20-2004, 12:38 PM
|
#1
|
LQ Newbie
Registered: Dec 2003
Distribution: gentoo
Posts: 12
Rep:
|
bash and symbolic link
This is probably an easy problem but i can't figure it out.
I put my /home/myhome directory on a different partition of my disk (called /gamma, which is mounted atomaticly) and linked it with a symbolic link into /home. (ln -s)
everything is fine so far, home behaves as if it was still on the root-partition.
but: i cannot execute shell-scripts from there anymore.
$ ./foo.sh
-bash: ./foo.sh: bin/bash: bad interpreter: Permission denied
i changed the owner of the symbolic link but with no success with the scripts.
besides i can runn scripts from /tmp which is on the root partition. somehow bash canīt access my home directory on the other partition via the symbolic link.
sorry about writing so much. if anyone has an idea, i would be quite happy.
cheerio
Last edited by zuma; 02-20-2004 at 12:45 PM.
|
|
|
02-20-2004, 01:24 PM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
assuming "-bash: ./foo.sh: bin/bash: bad interpreter: Permission denied" is a typo, then you need to check the execute permissions on the file, if not somethign seems to be up with your script, maybe you're using relative file paths for the shebang at the start? it does ask for bin/bash not /bin/bash...
|
|
|
02-20-2004, 03:22 PM
|
#3
|
LQ Newbie
Registered: Dec 2003
Distribution: gentoo
Posts: 12
Original Poster
Rep:
|
got a cue
ok, but the execute rights for the scripts are all right.
what gives me a cue is that i can actually run the scripts from my home with:
# bash ./foo.sh
but not with
# ./foo.sh which i can from any directory on the root partition.
somehow bash doesn't reach on my /gamma partition via the symbolic link??
how can i change this and be able to run scripts from home without explicitely calling the bash?
TIA
|
|
|
02-20-2004, 03:51 PM
|
#4
|
Member
Registered: Jan 2004
Location: On Planet Earth.
Distribution: Slackware 12
Posts: 244
Rep:
|
Hi
what is the output from your path command?
cheers
|
|
|
02-21-2004, 05:34 AM
|
#5
|
LQ Newbie
Registered: Dec 2003
Distribution: gentoo
Posts: 12
Original Poster
Rep:
|
path command?
i am awfully sorry but i don't know which output of a path command you mean?
hasta la proxima
|
|
|
02-21-2004, 06:44 AM
|
#6
|
Senior Member
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185
Rep:
|
type :
$PATH
some people insist you type :
echo $PATH
either way, you will end up with your answer ;-)
|
|
|
02-21-2004, 06:50 AM
|
#7
|
LQ Newbie
Registered: Dec 2003
Distribution: gentoo
Posts: 12
Original Poster
Rep:
|
2 differnet answers
well yes, now i have two versions:
echo $PATH
/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/
gcc-bin/3.2:/opt/Acrobat5:/usr/X11R6/bin:/opt/blackdown-
jdk-1.4.1/bin:/opt/blackdown-jdk-1.4.1/jre/bin:/usr/qt/3/bin:/
usr/kde/3.1/bin
$PATH
-bash: /bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/
gcc-bin/3.2:/opt/Acrobat5:/usr/X11R6/bin:/opt/blackdown-jdk-1.4.
1/bin:/opt/blackdown-jdk-1.4.1/jre/bin:/usr/qt/3/bin:/usr/kde/3.1/bin:
No such file or directory
and now?
|
|
|
01-03-2005, 04:18 PM
|
#8
|
LQ Newbie
Registered: Jan 2005
Location: Santiago, Chile
Distribution: suse, novell, redhat
Posts: 1
Rep:
|
sh: bad interpreter: Permission denied
I have the same problem, it was a "noexec" option
over the partition where the script exists.
I changed the /etc/fstab file and remount the partition
with the right option, like "mount -o remount,exec /partition"
fix the problem.
mmunoz@ademn.cl
|
|
|
All times are GMT -5. The time now is 10:30 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|