ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a question regarding a project that I'm working on. I'm using PERL and NET::FTP to write a small FTP web application script that will allow users on my Local Area Network to upload files to me. It will be running on my web server. I'm running RedHat Linux 9 and the Apache Web Server. I got the connection and login components working. Once the user logs into my web server using NET::FTP, I ask him to enter his local directory that contains the file he would like to upload, and the remote directory which is the destination where he wants this file to be saved on the server. I have no problem working with the remote information, but I can't seem to work with the user's local information. I am unable to retrieve any local directory information of the user due to the fact that these scripts are running off the web server. Any PWD, CWD, CHDIR that I do retrieves web server information and not local information. Is there any way to retrieve a user's local directory when he's accessing my perl script running on my web server?
I believe my problem is when I'm using the FTP PUT() function. The way I have it currently is:
I am only specifying the file. Maybe some sort of path is necessary? What do you think I am missing?
Thanks in advance to everyone. It is greatly appreciated.
i guess u cant acomplish what u intend with a cgi script. u need loacal perl scripts on the clients in the lan. on a web server u can upload files per http because this is the protocol the server understands and probably there are no ftp-servers running on the clients.
why not http?
Hello Matir, thanks for getting back to me on this.
Yes exactly, I'm trying to use a perl script running as a CGI program on a webserver to upload to the webserver. I'm using FTP via perl's NET::FTP class in order to transfer files from a local machine to the webserver. Both the local machine and webserver are running on a LAN.
However, because this perl script is running on the webserver, I am unable to retrieve any of the user's local directories that he specifies. Is there any way to retrieve local directories from a user who connects to me (the webserver) via FTP?
Hello j-ray, thanks for your reply as well.
There are FTP servers running on the clients and the webserver. How would I accomplish an upload using HTTP? Sorry I'm relatively new at perl and CGI.