Help answer threads with 0 replies.
Go Back > Forums > Other *NIX Forums > *BSD
User Name
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.


  Search this Thread
Old 04-19-2010, 01:23 PM   #1
Registered: Oct 2005
Distribution: Ubuntu Dapper (6.06)
Posts: 92

Rep: Reputation: 15
Exec format error. Binary file not executable. Fetch Bug?

freenas:~# cd /root
freenas:~# fetch -o /root/ ""
/root/                                  100% of 2120  B  480 kBps
freenas:~# chmod 0555
freenas:~# ./
./ Exec format error. Binary file not executable.
Clean install FreeNAS 0.7.1. I am using notepad++ on a windows 7 box to create this script and doing the Edit->EOL Conversions->Convert to Unix format. Then upload it the forums and download it from the web to my freenas box using fetch to download it.

If I transfer the same file over using WinSCP locally then i can chmod it and execute it.

When I fetch it seems to add some bogus data to the beginning of the file.

Been trying to figure this out for hours. Any ideas? Its like its downloading it in the wrong mode... I even tried zipping it, uploading it, downloading it, and still not success.

Any ideas? Alternative to fetch?
Old 04-21-2010, 04:30 PM   #2
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
After retrieving the file with fetch, what does the following tell you?
% file
Old 04-21-2010, 04:34 PM   #3
Registered: Oct 2005
Distribution: Ubuntu Dapper (6.06)
Posts: 92

Original Poster
Rep: Reputation: 15
Issue has been resolved.

Needed to save the file in Unix format and ANSI (it was originally in Unix and UTF-8 with/out BOM).
Has a table of the what you would see in the beginning of the file if you have it saved in UTF-8 etc.

thank you,


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How would I convert an arbitrary binary file into a Linux executable file? ootawata Programming 8 02-21-2010 11:21 PM
Library issues while installing from a binary executable file kliew Red Hat 4 03-18-2009 07:34 PM
not in executable format: File format not recognized ypy13 Linux - Newbie 9 07-09-2008 11:33 PM
Exec format error. binary file not executable. kaz2100 Linux - General 2 08-19-2006 05:26 PM
MDK 9.1 Fatal Error in Stage 1: Exec Format Error Beano Mandriva 5 09-12-2004 03:04 PM > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 04:49 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration