texuser74 has asked for the wisdom of the Perl Monks concerning the following question:
Iam try to copy few files from my linux machine to another linux machine using Net::FTP
when iam try to ftp the files to other folder, iam able to copy, but I can't copy to stat1's "/usr/local/bin" folder. It prompts put failed inside.pl: Permission denied. I know the superuser password, but don't know how to pass or change to superuser mode after getting connected. Please help me how to ftp to those folders which can be accessed only by the superuser.#!/usr/bin/perl use Net::FTP; $ftpobj = Net::FTP -> new ("station1")or die "Cannot connect to statio +n1:"; print "Sending files to station1\n"; $ftpobj -> login("stat1","stat1pass") or die "login failed ", $ftpobj- +>message; $ftpobj -> cwd ("/usr/local/bin") or die "cwd failed ", $ftpobj->messa +ge; $ftpobj -> put ("/home/raj/myc/fm/backup/inside.pl") or die "put faile +d ", $ftpobj->message;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: FTP script
by davido (Cardinal) on Jan 13, 2005 at 05:50 UTC | |
|
Re: FTP script
by jfroebe (Parson) on Jan 13, 2005 at 07:10 UTC | |
|
Re: FTP script
by svenXY (Deacon) on Jan 13, 2005 at 09:18 UTC |