chmod: 1: Syntax error: "(" unexpected - what's this mean and how do I fix it?
Some background:
I' hacking a series 1 tivo. One of the things to do is create a file (rc.sysinit.author) and chmod it so it is executable. I am in the directory where the file is, and enter this: /mnt7/bin/chmod: 755 rc.sysinit.author and I get this error: chmod: 1: Syntax error: "(" unexpected I'm no dummy. I stared with a digicomp1 in the late 60's, passed through the ZXZ81-C64-cp/m-8088-8086-80286-etctera-etcetera, fiddle with pics, am completely comfortable with a command line, and so on. I am, however, new to Linux. I have done quite a bit of googling to try to find what this error means, but have had no luck. There is a possible hint in that the directions I'm following said to just enter: chmod 755 rc.sysinit.author but that gave me another error: chmod: not found which I could figure out how to fix, as above, by declaring the entire path in the command. Because of this, I have tried a number of variations on the chmod command - things like using +x instead of 755, including the whole filename with path for the rc.sysinit.author file, changing to the /mnt/bin directory and doing ./chmod 755 /the-whole-filepath-for-the-rc.sysyinit.author file. No luck. I suppose I could edit the rc.sysinit file (runs first, then calls my file) which has the executable bit set but would rather know how to chmod. |
Command 'chmod 755 myfile' should work if path is set so that it contains /mnt7/bin and you own the file. Traditionally directory bin is under root so '/bin/chmod 755 myfile'. Check path by typing 'path'.
|
Quote:
Quote:
Check your path with Quote:
I have never worked on a Tivo before but if the rc.sysinit.author file is inside /mnt7 you could try to chroot into /mnt7 and try again. |
Quote:
chroot /mnt7 gives chroot: not found. |
Try 'file /mnt7/bin/chmod' - I'm trying to figure out how you can get an error that has nothing to do with your command and all I can think of is that your chmod is a shell script, for some reason, with a syntax error in it or something.
I have no idea about a tivo, though. Why 'mnt7'? Why is your path not reasonable? Etc. I'd go ahead and set a path with all the usual '*bin's and whatever unusual places I could think of but, like I say, 'tivo?' :) -- Oh yeah - I dunno what all you're up to, so this may not suffice but you can run a script that isn't executable by giving it as an argument to your shell - $SHELL rc.sysinit.author. So if you absolutely can't get it chmod'ed, you can still run it. But if things are that weird there'd be a lot more to fix than just running the file. |
Quote:
One of the steps is to tell the tivo to start a telnet server when it boots. They advise you not to edit the rc.sysinit file as there is a lot of critical stuff there; but to edit the file that it supposedly looks for and hands off to if it exists - i.e. rc.sysinit.author. I worked around it, sort of. I copied the rc.sysinit file which has the correct permissions to re.sysinit.bak; then edited THAT file, then rm'd the rc.sysinit.author that could not be chmod'ed, then copied the rc.sysinit.bak to rc.sysinit.author. LS -l shows all the correct permissions now. Now I'm fighting with the ethernet adapter and trying to see if the telnet command (which is what in rc.sysinit.author) works. Sometimes my router gives the adapter an IP and sometimes not, and I have not yet seen a prompt over telnet. It's a pain not having a screen to look at what's going on in the box: take drive out, attach to extra pc, boot pc, edit file, put drive in tivo, boot tivo, wait and talk to router, try to telnet...; repeat ad inf. Thanks all for replying. |
Just to follow in the trail of digiot.. He may be on something about the chmod being a script.
Check if you can do something like Quote:
Quote:
Also, are you following some guide on the internet when you are hacking on the Tivo? If so, it would be great if you posted a link to it. |
All times are GMT -5. The time now is 06:57 PM. |