Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: advice about FTP/CGI

by BBQ (Curate)
on Jul 11, 2000 at 20:12 UTC ( [id://22010]=note: print w/replies, xml ) Need Help??


in reply to advice about FTP/CGI

I'm not sure I understand exactly what it is you're trying to do, but if I had to do a workaround (via CGI) I'd do the following:
  • create a "permissions" table with usernames and passwords
  • accept file uploads via CGI authenticating against that table
  • after accepting the upload, connect to the FTP server with your default account
  • upload the file via Net::FTP
  • disconnect and return the status through CGI
The obvious downside to this, is the time required to do multiple file transfers. First you'd need to upload the file to the webserver and then transfer the same file to the FTP server. This could take a while depending on the size of the file!

Of course, I would also check with the server admin if this is a problem (and I would think it is, or else (s)he would have granted FTP access to your users in the first place). Instead of using FTP, I am currently working on a Virtual Filesystem with MySQL, so that users can share and store files via HTTPS. As soon as I finish it, I will be posting the code to the Code Catacombs.

#!/home/bbq/bin/perl
# Trust no1!

Replies are listed 'Best First'.
RE: Re: advice about FTP/CGI
by jlistf (Monk) on Jul 11, 2000 at 20:29 UTC
    i guess that'll work out. ideally, i'd like to provide the users with the same functionality as a direct FTP connection, just limit which files they can alter. if i do that with this method, it could take a real long time to perform a command. (open connection, perform command, get results, close connection, return results)

    the server admin shouldn't have any problem though. the users will all have access through one (my) account. the perl script is just there to limit which files each user can alter. basically the perl script will mimic the permission effects of multiple accounts while still only using one.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://22010]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-28 18:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found