CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
FTP Program

 



Revival Fire
Novice

Jul 16, 2001, 6:35 PM

Post #1 of 14 (1977 views)
FTP Program Can't Post

I know this is not technically about Perl programming, but I need to know if anyone knows of a good FTP program that will transfer files from a site on one server to another without losing the permissions on the cgi files. It would save me alot of time moving my website to our new server.



randor
User

Jul 16, 2001, 6:44 PM

Post #2 of 14 (1976 views)
Re: FTP Program [In reply to] Can't Post

Revival Fire,

I use WS_FTP, it is the best ftp program that i have found anywhere. if you look around you can find WS_FTPle95 which is a completly free version that works great.

I Hope this helps...

perl programmers don't die.. they just start writing a new script.


Revival Fire
Novice

Jul 16, 2001, 7:01 PM

Post #3 of 14 (1973 views)
Re: FTP Program [In reply to] Can't Post

I have WS_FTP but don't want to have to individually set the permissions like I do with it. I want to do a site move using an FTP program like FlashFXP found on CNET.com. If WS_FTP can do it, it must be a later version than mine then.

What I am wanting in other words, is to not have to download to my computer and then to my new site, but to just move a large number of files from site to site without losing permissions. I used FlashFXP trying to move my files and it was not only slow but it was also not very accurate. It would send blank files at times. It may be my new server (?).

Anyone know anything about a program that can help me do this let me know.



kojr
Novice

Jul 17, 2001, 3:30 AM

Post #4 of 14 (1964 views)
Re: FTP Program [In reply to] Can't Post

proftp is the best..



hippie
stranger

Jul 17, 2001, 8:41 AM

Post #5 of 14 (1956 views)
Re: FTP Program [In reply to] Can't Post

I'd say leechFTP. Never fails, always reliable. Get it free below:

http://stud.fh-heilbronn.de/~jdebis/leechftp/downloads.html



Revival Fire
Novice

Jul 17, 2001, 8:51 AM

Post #6 of 14 (1953 views)
Re: FTP Program [In reply to] Can't Post

I have that one. Can you make it move files from server to server instead of server to local computer to server?



mhx
Enthusiast / Moderator

Jul 17, 2001, 10:10 AM

Post #7 of 14 (1952 views)
Re: FTP Program [In reply to] Can't Post

Since we're on a Perl forum here, what about writing a customized script for that purpose? I think using the Net::FTP package it would be a matter of 100-200 lines of Perl to create an exact copy of a directory structure on another server. You could make connections to both servers, parse the directory listing, extract permission information, recurse through all subdirectories and mirror all files/directories to the other server and chmod them based on the gathered information.
At least that's what I would do if I couldn't find any other tool to do it ;-) I've been working with Net::FTP for automated uploads to keep directory structure consistent between my local and server files. I had some other requirements that no other program was capable of, such as automatic modification of certain files before uploading (while not actually modifying the local files) and (also) automatic chmod of new files that had to be executable on the server. The package is really easy to use. If nobody comes up with an alternative solution, I'd give it a try.

-- Marcus

P.S.: I also like LeechFTP, but it doesn't support what you need.


Code
s$$ab21b8d15c3d97bd6317286d$;$"=547269736;split'i',join$,,map{chr(($*+= 
($">>=1)&1?-hex:hex)+0140)}/./g;$"=chr$";s;.;\u$&;for@_[0,2];print"@_,"



Pro_4
User

Jul 17, 2001, 11:05 AM

Post #8 of 14 (1949 views)
Re: FTP Program [In reply to] Can't Post

I use LeechFTP too. It is good for what i need except i often overload it and it crashes or stops responding :p

Of course Marcus comes in here and says Hey why not program your own! What is the perldoc thing on it( like perldoc ftp) or is there a online documentation of it. How do you people find these documentations so easy, it takes me forever to find the one i want.

:)

@letters = ('A'..'Z', 'a'..'z', '1'..'5', '_');
@i = ( '15', '43', '40');
print @letters [ @i, -1, 55];


mhx
Enthusiast / Moderator

Jul 17, 2001, 2:44 PM

Post #9 of 14 (1943 views)
Re: FTP Program [In reply to] Can't Post

Ok, here are some general hints on Perl's packages.

Actually, finding the perldocs or a package itself is quite easy if you know the package name. The name of the package I mentioned in my last post is Net::FTP. To get the perldoc if the package is already installed, you just have to type:

Code
perldoc Net::FTP

If the package is not yet installed, go to CPAN Search and enter Net::FTP. You will receive a list of all packages that matched your search, including the Net::FTP and perhaps some related packages. You can also have a view at the online documentation at CPAN before downloading the package.
If you don't have the package name and search for something specific, e.g. a package that does telnet, enter telnet at CPAN Search and you will be taken to the Net::Telnet package. You can also browse CPAN by category, for example.
The nice thing about the Perl environment is that mostly all resources you need are in one place: CPAN. And it's relatively easy to find something there. As I recently searched for some Perl code to grab the embedded photographic information out of the pictures of my digital camera, I first tried searching CPAN and found the Image::Info module within less than a minute.
But not only are mostly all packages available from CPAN, they all share the same installation and documentation process. To view the documentation, you always type perldoc followed by the name of the package.

Hope this will help.

-- Marcus



Code
s$$ab21b8d15c3d97bd6317286d$;$"=547269736;split'i',join$,,map{chr(($*+= 
($">>=1)&1?-hex:hex)+0140)}/./g;$"=chr$";s;.;\u$&;for@_[0,2];print"@_,"



Revival Fire
Novice

Jul 17, 2001, 4:11 PM

Post #10 of 14 (1939 views)
Re: FTP Program [In reply to] Can't Post

I would love to have a cgi perl program that could do this but that would be a little over my head. I you can do it, I would appreciate it.



Revival Fire
Novice

Jul 17, 2001, 7:21 PM

Post #11 of 14 (1934 views)
Re: FTP Program [In reply to] Can't Post

The FTP freeware "Free Dup" offered at NoNags (http://www.ded.com/nonags/index.html) and downloaded from http://utenti.tripod.it/stefanopp/ has the right idea, but the software itself is almost to simplistic. It needs a way to browse and choose files in the server instead of just typing file names in. Read the description of his software...



(This post was edited by Revival Fire on Jul 17, 2001, 6:25 PM)


mhx
Enthusiast / Moderator

Jul 18, 2001, 8:40 AM

Post #12 of 14 (1921 views)
Re: FTP Program [In reply to] Can't Post

Hi Revival Fire,

I just had another idea how you could possibly solve your problem without a special FTP program. The easiest way would be if you have telnet access to your server. If this is the case, you could simply use tar to create an archive of all your files. Since tar also saves the permissions of the files, you can download that archive, upload it to the other server, and untar the files there.
If you don't have telnet access, you can try to run tar from a CGI script. Another possibility would be to use the two scripts I've attached, which I have written quite some time ago because I also don't have telnet access to my server. These two scripts act more or less like a poor man's telnet. I've written them just to browse through the server a little bit.
Before I explain exactly what the scripts are doing, I have something important to say: Leaving this script on your server is a very, very high security risk. There's no password or any other kind of protection. Anyone who knows the URL of the script can do just about everything on your server, e.g. delete all your files or even worse. Upload the script, use it, and immediately delete it after usage. Or try to add some security patches.
Ok, now what are the scripts doing. The first one is intended to be uploaded to your server. It is invoked like any other CGI script by an HTTP request. It has two parameters, the current working directory and the command to execute. When executing a command, it opens a pipe from the command and returns all it's standard and error output as well as the current working directory via plain text output.
The second script is intended to run on your local system. You have to supply the name of your server as the only argument, otherwise it will use localhost. Once you run the script, it requests the current working directory from the CGI script on your server. If it succeeds, you will receive a prompt to enter your commands. You can type 'exit' or 'quit' to exit the program.
Please, try to have a look at both scripts first, and -- even more important -- try to understand how dangerous it can be to leave them on your server.
You may need to modify the $baseurl in the local script, and I'd recommend not to name the remote script 'exec.cgi'. If you give it a name only you know, it would be a bit safer. Just edit the $baseurl line to contain the new name of the script.
There's also some code in there to remove the banner that netfirms.com inserts in every page. You can ignore this, because it won't do any harm if there's no banner.
I hope this will help you.

-- Marcus


Code
s$$ab21b8d15c3d97bd6317286d$;$"=547269736;split'i',join$,,map{chr(($*+= 
($">>=1)&1?-hex:hex)+0140)}/./g;$"=chr$";s;.;\u$&;for@_[0,2];print"@_,"



wickedxter
User

Jul 18, 2001, 11:08 AM

Post #13 of 14 (1917 views)
Re: FTP Program [In reply to] Can't Post

try cuteftp, it's really easy to use but it's not freeware...



hippie
stranger

Jul 19, 2001, 7:42 AM

Post #14 of 14 (1895 views)
Re: FTP Program [In reply to] Can't Post

Maybe BitBeamer (the successor to Leech) will support server2server transfer. Anyone got any news on that? I can never seem to access their web site, bitbeamer.com


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives