We help IT Professionals succeed at work.
Get Started

Performing RSH on Unix from Windows ASP

1,213 Views
Last Modified: 2013-12-21
I am trying to FTP files to a Unix box from my Windows 2003 Server using ASP, then change the permissions to the file using RSH.

I have the FTP working, however, when attempting to perform an RSH to the box (rsh server chmod 775 tst.sh) I am not getting through, which I assume is due to a permission based issue since the user performing the action is the internet based acct (ISUR_SERVERNAME).

I tried several ways from putting the actual code into the ASP page, to just putting it into a .bat file and then calling it from the ASP page (see example showing me trying to just run an ls command and pipe the output to a text file on the server).

If any of the experts could help me that would be great.


<% 
' Example of running straight from code
    set wshell = CreateObject("WScript.Shell") 
    wshell.run "rsh.exe serveranme ls > C:\Inetpub\wwwroot\idap\dir.txt"	', 0, TRUE
    set wshell = nothing 
	Response.Write("all done")
%>

Open in new window

Comment
Watch Question
Top Expert 2015
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE