Help please - "#exec cmd" stops working after downloading to Windows
Sorry if I'm posting in the wrong place but I need some help with some code on a UNIX server running Apache.
The index.html runs fine with the exec cmd command if the html is updated on the Unix server itself with VI editor, but if it's downloaded to a Windows machine then uploaded back, the exec cmd doesn work. It's as if the server is reading the code as a remark. If you look at the source code of the page, it's just in there like a remark. It also doesn't make a difference if I don't even open the code. If I just FTP it to my PC then put the file back, the command is read as a remark.
Can anyone help me with fixing this problem? I'm not familiar enough with VI editor to make the changed using Putty so I need to make the changed in a text editor in Windows.
Although I'm a Windows user, I've managed to figure out the fix; I had do a chmod to allow it to execute, but now I have a chmod question.
I found a tutorial that explains chmod but I can't figure out how to get my index.html file to have these permissions: - rwxrwxr-x
My understanding is that the last 6 characters are for the group, the last 3 is other so I'm assuming the 1st 3 are user. How do I do a chmod to so -rwxrwxr-x?
BTW, what I did was give all read, write and execute permissions to run, but I'd like to fix it so permission remains what the original permissions were before I downloaded the file.
check here for a good tutorial: http://www.linuxcommand.org/lts0070.php
chmod -rwxrwxr-x would be:
chmod 775 somefile
so I'm assuming the 1st 3 are user => The file's owner
Thanks for the info. I'd played around with Linux when Red Hat 5.0 came out so I remembered doing a chmod command. Funny thing is is that last night, when I was looking up the info on chmod, the 1st examples had me using "chmod og=rw filename". It confused me because I remember doing chmod 777 to give everyone access, but since it worked I left it alone. Well, atleast not, chmod and the numbers still work. Thanks for the info and I'll make sure to bookmark the link.
|All times are GMT -5. The time now is 11:43 AM.|