Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i execute a system() command from a remote machine?

Status
Not open for further replies.

qednick

Programmer
Joined
Jul 26, 2002
Messages
516
Location
US
Hi again all, perhaps we should rename this forum "qednick's unix problems"...

anyways, i have another question: say i have a program sitting on my unix web server and I want to execute it from another computer remotely.

For example, say i have a file on the server called "somefile.txt" and I want to chmod 0700 this file from my home computer using a program (i don't mean telnet) I have written. If my program was not remote, within my program I could just use:

system("chmod 0700 somefile.txt");

however, i want to do the same thing from the remote computer just like telnet or ftp programs do. How do I do this?

The answer is probably very simple but I can't see the wood for the trees at the moment.

[bugeyed]
tellis.gif

programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
 
Some amateur hint is here
thread116-400709 is for Windows client, but, I think, it can be adopted for Unix too.
 
Thanks mingis. I was actually thinking along those lines but thought there may be a simpler and more 'direct' approach. My original idea was to implement a very small cgi script on the unix server which, when called, would execute the command on behalf of the windows app. I could also implement some basic security checking before the script executes.

:-)
tellis.gif

programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top