Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-18-2002, 10:38 PM   #1
LQ Newbie
Registered: Feb 2002
Posts: 2

Rep: Reputation: 0
need help with chattr


I am extremely green when it comes to linux and need some help chattr a file....

I am trying to set a file to mutable using the command
chattr -i filename at the bash prompt

it responds with "/hack/bin//chattr: cannot execute binary file"

this is a tivo that i am trying to change the network address on. As I understand, I have to make this change to be able to edit the configuration file.

i've tried typing "/hack/bin/chattr" instead of just chattr but that returns the same message...i then copied the chattr file into the directory that contains the file that I am trying to edit and still, the same message...

Any help would be appreciated.

Old 02-19-2002, 03:34 AM   #2
Senior Member
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Try: chmod +x /hack/bin/chattr
Then try to run it with either the full pathname. Or add /hack/bin to your PATH.
Old 02-19-2002, 03:44 AM   #3
LQ Newbie
Registered: Feb 2002
Posts: 2

Original Poster
Rep: Reputation: 0
Thx Mik,

I was able to successfully chmod the chattr file...but when I tried to chattr the file that i need to make "editable" it still gave the same error.. /hack/bin/chattr: cannot execute binary file

any other ideas??

Old 02-19-2002, 10:29 AM   #4
Senior Member
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Hmm weird. Why is it located in such a weird directory anyways? Where did you get the executable from? Is it built for the architecture on which you are trying to run it? What does the following command tell you:
file /hack/bin/chattr

If you are running it on a linux system it should say something like ELF 32 bit executable and the architecture like 80386.

Or have you by any chance disabled support for executing ELF files in the kernel. That would break most of your system though since most of them are ELF files.

Chattr is made to work on ext2 filesystems so it probably won't do much on other file systems. But the it would probably be giving a different error message.
Old 02-19-2002, 10:39 AM   #5
Registered: Jan 2002
Location: Galveston Island
Distribution: suse, redhat
Posts: 208

Rep: Reputation: 30
Do a "file /hack/bin/chattr" to find out what kind of binary file it is. Most likely it's not an ELF executable or is for the wrong architecture.


Damn, hate when that happens. Mik beat me to it.

Last edited by Malicious; 02-19-2002 at 10:41 AM.


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
chattr not working JJX Linux - Newbie 3 10-18-2005 03:39 AM
chattr + 2.4.20-lq2? tarballedtux Linux - Security 3 01-06-2003 08:30 AM
Problem with chattr FredrikN Linux - General 1 12-29-2002 11:48 AM
chattr +i to all files on my box? ForumKid Linux - Security 3 01-07-2002 10:58 AM
chattr usage sancho5 Linux - General 0 11-21-2001 02:02 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:36 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