[CentOS] Serious Privileges Problem: Second Post!
Stephen Harris
lists at spuddy.org
Sat Nov 7 18:40:15 UTC 2009
On Sat, Nov 07, 2009 at 10:23:11AM -0800, John R Pierce wrote:
> Kwan Lowe wrote:
> > On Sat, Nov 7, 2009 at 12:04 PM, Les Mikesell <lesmikesell at gmail.com> wrote:
> >
> >
> >> How did you get it from machine to machine? This could be a line-ending issue
> >> from a copy from windows or the wrong mode in ftp.
> >>
> >
> > That is my guess too. This exact error will happen if the file is
> > copied in Dos format to Linux.
> >
>
> ah, yes, python, where whitespace is a syntax element
Not necessarily anything to do with python; a shell script or perl program
would suffer the same problem.
See if a file beginning "#!/bin/sh" was sent as a DOS file then Unix would
see it as "#!/bin/sh^M" (where ^M is the carriage-return character 0x0d)
and so would try to run the script under "/bin/sh^M". This, clearly,
doesn't exit. Same would be true for /usr/bin/perl^M or /usr/bin/python^M
and so on.
Victor was told do to "dos2unix" which fixes the problem but he ignored
the info ("dos2unix?! Huh? Where's the dos?") so *shrug*
As they say, you can lead a horse to water...
--
rgds
Stephen
More information about the CentOS
mailing list