[Tutor] why doesn't procbox run?

john gennard joney@clara.co.uk
Tue Nov 19 16:04:28 2002


On Monday 18 November 2002 18:17, Danny Yoo wrote:
> On Mon, 18 Nov 2002, john gennard wrote:

Hi Danny,
I've solved the problem, but I don't why what I did cleared matters 
up, and I suppose now I never will.

My permissions were exactly the same as those in Potato - I checked 
every one in detail. I have Potato and Woody on the same machine, so 
it was easy to mount one onto the other and check 'side by side' (I 
even printed everything out to study/compare). 
/usr/local/bin/procbox.py was definitely  0755.

I deleted Python and procbox and shutdown. 
After a cuppa I reinstalled both and the program ran without 
difficulty. I've checked all permissions against my print out and 
there's no variation (except that the program now runs)

[snip]

> >
> > 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/msg065
>10.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

debian-user is my 'home list'. I tried this list first, because I 
had no way of knowing whether to problem was python or Debian 
specific. And, of course, I still do not.

The suggestion from Magnus gave me 'can't open file' and that from 
Emile didn't make any difference.

Many thanks to you all for the suggestions and support.

With gratitude,		John.