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-14-2006, 09:35 PM   #1
LQ Newbie
Registered: Feb 2006
Posts: 5

Rep: Reputation: 0
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.

Old 02-14-2006, 11:03 PM   #2
LQ Newbie
Registered: Feb 2006
Posts: 5

Original Poster
Rep: Reputation: 0
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.

Old 02-15-2006, 04:00 AM   #3
Registered: Nov 2005
Distribution: xubuntu, grml
Posts: 451

Rep: Reputation: 38
check here for a good tutorial:
chmod -rwxrwxr-x would be:
chmod 775 somefile

so I'm assuming the 1st 3 are user => The file's owner

Last edited by muha; 02-15-2006 at 04:03 AM.
Old 02-15-2006, 02:08 PM   #4
LQ Newbie
Registered: Feb 2006
Posts: 5

Original Poster
Rep: Reputation: 0

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.



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
No UTMPX entry, You must EXEC "login" for the lowest "shell" ooihc Solaris / OpenSolaris 7 03-12-2007 03:09 PM
SpamAssassin Error "spamd: no response to STREAM cmd, Success" and other errors PlorkZ Linux - Software 1 11-18-2004 05:16 PM
"cannot exec `as': ..." AND "C compiler cannot create ..." pr3st0 Linux - Software 0 10-15-2004 01:42 PM
"v" key stops working chichibabin Linux - General 9 10-17-2003 10:46 AM
CSH: "cmd >& file" or "cmd </dev/null >& file" stefanlasiewski Programming 1 09-08-2003 05:19 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration