[Tutor] Running Python on Gentoo

David Rock david at graniteweb.com
Fri Jul 27 17:57:11 CEST 2007


* Greg Lindstrom <greg.lindstrom at novasyshealth.com> [2007-07-26 13:44]:
> Hello,
> I am running python 2.4.2 on Gentoo Unix and am having problems running 
> programs.  I have a script, hello.py as such:
> 
> #! /usr/bin/python
> print 'hello, world'
> 
> that I save and add executable permission.  Then at the prompt I type in..
> 
> $ ./hello.py
> -bash: ./hello.py: /usr/bin/python: bad interpreter: Permission denied
> 
> If I type
> $ python hello.py
> I get "hello, world" as expected.
> 
> I was hoping that the "shabang" would have the script execute.  Am I 
> missing something?  Can you help me?  BTW, when I type /usr/bin/python 
> at the prompt I get the python interpreter, so at least that's working.

Are you using any hardened gentoo kernels or anything like that, or is
it a "normal" gentoo build?

I don't think this is a python problem, but rather a permissions problem
at a level OTHER than the filesystem.

I found this in the gentoo forums:
http://forums.gentoo.org/viewtopic-t-549470-highlight-interpreter+permission+denied.html

Are you using any "trusted path execution" in the kernel?  This would
potentially be something that could happen with ANY lniux system, not
just gentoo.

FWIW, I am having the same problem (even though I never actually tried
on this system before) :-)

-- 
David Rock
david at graniteweb.com


More information about the Tutor mailing list