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!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.