Windows text file SCP to Linux permission error

134 views Asked by At

I'm using a vbscript to pscp a text file over to a Linux device on Centos 6 (httpd.conf). If I nano the file and paste in the text, apache will start just fine, but using pscp to transfer the same text file gives me errors.

  • I've tried changing permissions of the file, not the issue.
  • I've tried doing a Replace(text,vbcrlf,vblf), still no luck.
  • I'm using FSO.OpenTextFile(file, 2, True, 0) to make sure it's ASCII

Any other replacements I need to do, or parameter I need to use with PSCP?

1

There are 1 answers

0
Cameron Darlington On

I've addressed the issue by using cat to create a new file after the transer

From my Windows Host:

pscp.exe C:\Myfile.conf username@linuxhost:tempfile.conf

Linux Host:

cat tempfile.conf > myfile.conf
rm -f tempfile.conf