On 27 July 2007, Greg Lindstrom wrote:
> Hello-
>
> I am programming Python (2.4.1) scripts to run on our Gentoo boxes and am
> having a bit of trouble I was hoping you could help me with.  My file,
> hello.py looks like this:
>
> #!/usr/bin/python
> print 'hello, python'
>
> I add execute permission to the file and try to run it as follows:
>
> myprompt $ ./hello.py
>
> and get
>
> -bash: ./hello.py: /usr/bin/env: bad interpreter: Permission denied
>
> running /usr/bin/python brings up the python shell, so that's in place.

So the symlink from /usr/bin/python to the real binary is correct and the real 
binary has the right permissions.

If your line starting with "#!/" weren't the first line in your script, you 
would get a different error message. Same if the "#" weren't the first 
character in that line.

This leads to the question whether you can start *any* executable from your 
home directory (assuming you stored your script somewhere under your home 
directory). If not so, do you mount your /home partition with the "noexec" 
option?

Uwe

-- 
Jethro Tull: Maybe, I am not done yet!
-- 
[EMAIL PROTECTED] mailing list

Reply via email to