LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   need help with chattr (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-with-chattr-14574/)

ruprick 02-18-2002 10:38 PM

need help with chattr
 
Hi,

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.

Cheers-

Mik 02-19-2002 03:34 AM

Try: chmod +x /hack/bin/chattr
Then try to run it with either the full pathname. Or add /hack/bin to your PATH.

ruprick 02-19-2002 03:44 AM

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??

Thanks

Mik 02-19-2002 10:29 AM

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.

Malicious 02-19-2002 10:39 AM

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.

Edited:

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


All times are GMT -5. The time now is 12:16 AM.