FTP - preserving permissions

FTP - preserving permissions

Post by wfirkse » Thu, 01 Jun 2000 04:00:00



I am trying to ftp a directory and all its files from one SCO server to
another, while preserving the user, group, and permissions.
I'm running the following line in a bourne shell script, and it works fine
under SCO 3.2.

(echo "bin";echo "cd $drive";echo "umask 000" ;echo "get " $dir ".tar"
;sleep 1) | ftp -i -v server2

I just can't seem to get it to work for SCO OS/5. The problem is in the "get
xxx.tar" command. It appears that OS/5 doesn't understand this.
Any suggestions on how to get this to work, or another way to accomplish the
same desired results, would be most appreciated.

Thanks in advance,
Bill

 
 
 

FTP - preserving permissions

Post by Real » Sat, 03 Jun 2000 04:00:00



Quote:> I am trying to ftp a directory and all its files from one SCO server to
> another, while preserving the user, group, and permissions.
> I'm running the following line in a bourne shell script, and it works fine
> under SCO 3.2.

> (echo "bin";echo "cd $drive";echo "umask 000" ;echo "get " $dir ".tar"
> ;sleep 1) | ftp -i -v server2

> I just can't seem to get it to work for SCO OS/5. The problem is in the
"get
> xxx.tar" command. It appears that OS/5 doesn't understand this.
> Any suggestions on how to get this to work, or another way to accomplish
the
> same desired results, would be most appreciated.

You mean that the FTP-server does not understand the GET command ?  You
didn't include an example but I don't think thats the case. It seems to me
the echo of the get-part isn't right. To many quotes and spaces. Try this;

(echo "bin";echo "cd $drive";echo "umask 000" ;echo "get ${dir}.tar"; sleep
1) | ftp -i -v server2

Cheers,
Real

 
 
 

FTP - preserving permissions

Post by bmar.. » Sat, 03 Jun 2000 04:00:00



   >I just can't seem to get it to work for SCO OS/5. The problem is in
   >the "get xxx.tar" command. It appears that OS/5 doesn't understand
   >this. Any suggestions on how to get this to work, or another way to
   >accomplish the same desired results, would be most appreciated.
   >Thanks in advance,
   >Bill

Some ftp daemons tar automatically, some don't.  Either install a
different ftpd or telnet to the server, tar the files and then ftp the tar
file.

Net-Tamer V 1.08X - Test Drive

 
 
 

FTP - preserving permissions

Post by Phi » Sat, 03 Jun 2000 04:00:00





>You mean that the FTP-server does not understand the GET command ?  You
>didn't include an example but I don't think thats the case. It seems to me
>the echo of the get-part isn't right. To many quotes and spaces. Try this;

>(echo "bin";echo "cd $drive";echo "umask 000" ;echo "get ${dir}.tar"; sleep
>1) | ftp -i -v server2

On most of the FTP servers I've ever used, umask isn't a command. SITE UMASK
<blah> is though.
Phil.