[Tutor] why doesn't procbox run?

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Mon Nov 18 13:18:02 2002


On Mon, 18 Nov 2002, john gennard wrote:

> I'm not sure if this question is OT or not, but I'll give it a try.
>
> For a long time, I have run Debian Potato (it's still installed). I've
> now installed Debian Woody as well.
>
> I filter my email on Potato with a small program called procbox which
> doesn't seem to be supported now, so I copied it over from Potato to
> Woody.
>
> Procbox is written in Python, but does not run on Woody. The error
> message says 'bash: /usr/local/bin/procbox.py:  /usr/bin/python: bad
> interpreter: Permission denied'
>
> All permissions have been checked against Potato as has the integrity of
> the program, PATHS and so forth.


Hi John,

That's odd!  Hmmm... do you think it might be a permissions problem?
'/usr/bin/python' is definitely there on your system; otherwise, you
would have gotten the error message:

###
bash: ./foo.py: /usr/bin/python: bad interpreter: No such file or
directory
###


instead of "Permission denied."


Oh!  Wait.

  http://lists.debian.org/debian-user/2002/debian-user-200210/msg06510.html

Ah ha!  This sounds familiar... *grin*


John, check the permissions on the procbox script: I get the feeling that
the script itself is not executable.  The error message that you're
getting is misleading by not telling that the script itself might not have
the right permissions set up.  Here's an example of what can happen:

###
[dyoo@tesuque dyoo]$ cat foo.py
#!/usr/bin/python

print "hello"
[dyoo@tesuque dyoo]$ ls -l foo.py
-rw-r--r--    1 dyoo     users          33 Nov 18 10:12 foo.py
[dyoo@tesuque dyoo]$ ./foo.py
bash: ./foo.py: /usr/bin/python: bad interpreter: Permission denied
[dyoo@tesuque dyoo]$
[dyoo@tesuque dyoo]$ chmod +x foo.py
[dyoo@tesuque dyoo]$ ./foo.py
hello
[dyoo@tesuque dyoo]$ ls -l foo.py
-rwxr-xr-x    1 dyoo     users          33 Nov 18 10:12 foo.py
###


Next time, you might also want to try the Debian-user mailing list,
because it's very possible that someone else there has run into a similar
issue.

    http://lists.debian.org/debian-user/


Good luck to you!