1 |
On 27 July 2007, Greg Lindstrom wrote: |
2 |
> Hello- |
3 |
> |
4 |
> I am programming Python (2.4.1) scripts to run on our Gentoo boxes and am |
5 |
> having a bit of trouble I was hoping you could help me with. My file, |
6 |
> hello.py looks like this: |
7 |
> |
8 |
> #!/usr/bin/python |
9 |
> print 'hello, python' |
10 |
> |
11 |
> I add execute permission to the file and try to run it as follows: |
12 |
> |
13 |
> myprompt $ ./hello.py |
14 |
> |
15 |
> and get |
16 |
> |
17 |
> -bash: ./hello.py: /usr/bin/env: bad interpreter: Permission denied |
18 |
> |
19 |
> running /usr/bin/python brings up the python shell, so that's in place. |
20 |
|
21 |
So the symlink from /usr/bin/python to the real binary is correct and the real |
22 |
binary has the right permissions. |
23 |
|
24 |
If your line starting with "#!/" weren't the first line in your script, you |
25 |
would get a different error message. Same if the "#" weren't the first |
26 |
character in that line. |
27 |
|
28 |
This leads to the question whether you can start *any* executable from your |
29 |
home directory (assuming you stored your script somewhere under your home |
30 |
directory). If not so, do you mount your /home partition with the "noexec" |
31 |
option? |
32 |
|
33 |
Uwe |
34 |
|
35 |
-- |
36 |
Jethro Tull: Maybe, I am not done yet! |
37 |
-- |
38 |
gentoo-user@g.o mailing list |