WebFaction
Community site: login faq

I have done this successfully in the past so I'm not sure if something changed or I'm overlooking something. When I "chmod u+x path" my python2.7 file and then run "./path" I get ": No such file or directory" instead of it running the file.

My shebang is set to "#!/usr/bin/env python2.7".

My goal is for this to execute using mail2script, but that won't work until I make sure the file is executable.

Thanks.

asked 06 Feb '15, 20:01

blandfx
134
accept rate: 0%


Your script is probably saved with DOS line endings, ie you're probably seeing a "^M" in the error message somewhere.

You can fix it by running: dos2unix path (replacing "path" with the full path to the script, obviously.

Hope that helps!

permanent link

answered 06 Feb '15, 21:03

seanf
12.2k42136
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×262
×6
×4

question asked: 06 Feb '15, 20:01

question was seen: 2,380 times

last updated: 06 Feb '15, 21:03

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM