Serious Privileges Problem: Please Help

Victor Subervi victorsubervi at gmail.com
Tue Nov 10 09:37:57 EST 2009


For others who discover this error, here's what happened as I've traced it:
1) I never before had built a python interpreter on my Windoze box. That was
kind of silly, since I was uploading to my server every time I wanted to
test. So I built on my Windoze box. Thereafter, Windoze assumed that all
*.py files were native to its environment. That's where the little devil
crept in.
2) When I went to edit my files on the server, I never saw any lines ending
in "^M", the dead giveaway that Windoze has mangled the line endings. So the
problem was __invisible__.

Wow. What a pain in the &(%(
Thanks for everyone's help!
V

On Mon, Nov 9, 2009 at 9:12 PM, Dave Angel <davea at ieee.org> wrote:

> Victor Subervi wrote:
>
>> On Mon, Nov 9, 2009 at 2:30 PM, Victor Subervi <victorsubervi at gmail.com
>> >wrote:
>>
>>
>>
>>> On Mon, Nov 9, 2009 at 2:27 PM, Rami Chowdhury <rami.chowdhury at gmail.com
>>> >wrote:
>>>
>>>
>>>
>>>>
>>>>  <snip>
>>>
>>>
>>> Hold everything. Apparently line-endings got mangled. What I don't
>>>
>>>
>> understand is why I didn't see them when I opened the file to edit, and
>> why
>> they didn't copy and paste when I did that. But dos2unix cleaned up a
>> couple
>> of files so I presume it will clean up the rest. However, I tried one
>> file,
>> that reads exactly the same as index.py, and when I surfed to it got a 500
>> error. Here's what the log said:
>>
>> <snip>
>>
>>
> What I've diagnosed as happening when a python script with Windows
> line-ending was posted on my server's cgi environment:
>
> The actual error seemed to be a failure to find the python interpreter,
> since some Unix shells take the shebang line to include the \r character
> that preceded the newline.   Seems to me they could be more tolerant, since
> I don't think control characters are likely in the interpreter file name.
>
> DaveA
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091110/dcf2c24e/attachment-0001.html>


More information about the Python-list mailing list