[thelist] Need help with Perl upload code and password protected directory

Raditha Dissanayake jabber at raditha.com
Mon Jan 12 18:41:48 CST 2004


Hi,

SInce you have obfuscated your pathnames it's had to figure out what's 
happening. Repost with your full pathnames and urls.
and you don't seem to be decoding the post data either.




Amy Johnson wrote:

>I have the following code I use to upload files to a UNIX system.  
>
>    $POST_MAX=-1;   ## controls how many bytes a user is allowed to
>upload (neg is unlimited)
>    open (SAVE,">$rptdir$finalfile");
>    binmode SAVE;
>    while (read($file,$data,1024)) {
>      print SAVE $data;
>    }
>    close SAVE; 
>
>
>I would like to be asked for a password before uploading to the
>writeable directory.  But I don't want to be asked for a password when
>downloading.  The directory is set to 777.  I have the .htaccess file
>set up as below.  But it doesn't ask me for a password and allows the
>code to write to the directory with no problems.  Any suggestions about
>how to get the directory password protected for uploading files would be
>appreciated.  Thanks! Amy
>
>============.htaccess file============
>
>AuthUserFile /usr/blah/blah/blah/.htpasswd
>AuthGroupFile /dev/null
>AuthName ByPassword
>AuthType Basic
>
><Limit PUT>
>require user water
></Limit>
>
><Limit GET>
>allow from all
></Limit>          
>
>
>  
>


-- 
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.




More information about the thelist mailing list